import java.util.Scanner;

public class Main{
	
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
      	int i = 0, input, total = 0;
      	while(i < 3){
          input = Integer.parseInt(sc.next());
          total += input;
          i++;
        }
      
      	if(total % 10 == 7){
        	System.out.println("YES");
        }else{
        	System.out.println("NO");
        }
	}
} import java.util.Scanner; Scanner java.util public class Main{
	
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
      	int i = 0, input, total = 0;
      	while(i < 3){
          input = Integer.parseInt(sc.next());
          total += input;
          i++;
        }
      
      	if(total % 10 == 7){
        	System.out.println("YES");
        }else{
        	System.out.println("NO");
        }
	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
      	int i = 0, input, total = 0;
      	while(i < 3){
          input = Integer.parseInt(sc.next());
          total += input;
          i++;
        }
      
      	if(total % 10 == 7){
        	System.out.println("YES");
        }else{
        	System.out.println("NO");
        }
	} main {
		Scanner sc = new Scanner(System.in);
      	int i = 0, input, total = 0;
      	while(i < 3){
          input = Integer.parseInt(sc.next());
          total += input;
          i++;
        }
      
      	if(total % 10 == 7){
        	System.out.println("YES");
        }else{
        	System.out.println("NO");
        }
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int i = 0 i 0 input input total = 0; total 0 while(i < 3){
          input = Integer.parseInt(sc.next());
          total += input;
          i++;
        } i < 3 i 3 {
          input = Integer.parseInt(sc.next());
          total += input;
          i++;
        } input = Integer.parseInt(sc.next()) input Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc total += input total input i++ i if(total % 10 == 7){
        	System.out.println("YES");
        }else{
        	System.out.println("NO");
        } total % 10 == 7 total % 10 total 10 7 {
        	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 i = 0, input, total = 0;
      	while(i < 3){
          input = Integer.parseInt(sc.next());
          total += input;
          i++;
        }
      
      	if(total % 10 == 7){
        	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 i = 0, input, total = 0;
      	while(i < 3){
          input = Integer.parseInt(sc.next());
          total += input;
          i++;
        }
      
      	if(total % 10 == 7){
        	System.out.println("YES");
        }else{
        	System.out.println("NO");
        }
	}
} Main
import java.util.Scanner;

public class Main{
	
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
      	int i = 0, input, total = 0;
      	while(i < 3){
          input = Integer.parseInt(sc.next());
          total += input;
          i++;
        }
      
      	if(total % 10 == 7){
        	System.out.println("YES");
        }else{
        	System.out.println("NO");
        }
	}
}
