import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
        int a = 0;
        int count = 0;
      
        for(int i = 0;i < 3;i++){
          a = sc.nextInt();
       	    if(a == 7){
              count += 1;
        	}else if(a == 5){
              count += 10;
            }
        }
        if(count == 21){
        	System.out.println("YES");
        }else{
          	System.out.println("NO");
        }
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
        int a = 0;
        int count = 0;
      
        for(int i = 0;i < 3;i++){
          a = sc.nextInt();
       	    if(a == 7){
              count += 1;
        	}else if(a == 5){
              count += 10;
            }
        }
        if(count == 21){
        	System.out.println("YES");
        }else{
          	System.out.println("NO");
        }
    }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
        int a = 0;
        int count = 0;
      
        for(int i = 0;i < 3;i++){
          a = sc.nextInt();
       	    if(a == 7){
              count += 1;
        	}else if(a == 5){
              count += 10;
            }
        }
        if(count == 21){
        	System.out.println("YES");
        }else{
          	System.out.println("NO");
        }
    } main {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
        int a = 0;
        int count = 0;
      
        for(int i = 0;i < 3;i++){
          a = sc.nextInt();
       	    if(a == 7){
              count += 1;
        	}else if(a == 5){
              count += 10;
            }
        }
        if(count == 21){
        	System.out.println("YES");
        }else{
          	System.out.println("NO");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = 0; a 0 int count = 0; count 0 for(int i = 0;i < 3;i++){
          a = sc.nextInt();
       	    if(a == 7){
              count += 1;
        	}else if(a == 5){
              count += 10;
            }
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
          a = sc.nextInt();
       	    if(a == 7){
              count += 1;
        	}else if(a == 5){
              count += 10;
            }
        } {
          a = sc.nextInt();
       	    if(a == 7){
              count += 1;
        	}else if(a == 5){
              count += 10;
            }
        } a = sc.nextInt() a sc.nextInt() sc.nextInt sc if(a == 7){
              count += 1;
        	}else if(a == 5){
              count += 10;
            } a == 7 a 7 {
              count += 1;
        	} count += 1 count 1 if(a == 5){
              count += 10;
            } a == 5 a 5 {
              count += 10;
            } count += 10 count 10 if(count == 21){
        	System.out.println("YES");
        }else{
          	System.out.println("NO");
        } count == 21 count 21 {
        	System.out.println("YES");
        } System.out.println("YES") System.out.println System.out System System.out "YES" {
          	System.out.println("NO");
        } System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
        int a = 0;
        int count = 0;
      
        for(int i = 0;i < 3;i++){
          a = sc.nextInt();
       	    if(a == 7){
              count += 1;
        	}else if(a == 5){
              count += 10;
            }
        }
        if(count == 21){
        	System.out.println("YES");
        }else{
          	System.out.println("NO");
        }
    }
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
        int a = 0;
        int count = 0;
      
        for(int i = 0;i < 3;i++){
          a = sc.nextInt();
       	    if(a == 7){
              count += 1;
        	}else if(a == 5){
              count += 10;
            }
        }
        if(count == 21){
        	System.out.println("YES");
        }else{
          	System.out.println("NO");
        }
    }
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
        int a = 0;
        int count = 0;
      
        for(int i = 0;i < 3;i++){
          a = sc.nextInt();
       	    if(a == 7){
              count += 1;
        	}else if(a == 5){
              count += 10;
            }
        }
        if(count == 21){
        	System.out.println("YES");
        }else{
          	System.out.println("NO");
        }
    }
}