import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
      	int cnt5 = 0;
      	int cnt7 = 0;
      	int a = sc.nextInt();
      	cnt5 = (a == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (a == 7) ? cnt7 + 1:cnt7;
      	int b = sc.nextInt();
      	cnt5 = (b == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (b == 7) ? cnt7 + 1:cnt7;
      	int c = sc.nextInt();
      	cnt5 = (c == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (c == 7) ? cnt7 + 1:cnt7;
      
      	if (cnt5 == 2 && cnt7 == 1) {
          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 cnt5 = 0;
      	int cnt7 = 0;
      	int a = sc.nextInt();
      	cnt5 = (a == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (a == 7) ? cnt7 + 1:cnt7;
      	int b = sc.nextInt();
      	cnt5 = (b == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (b == 7) ? cnt7 + 1:cnt7;
      	int c = sc.nextInt();
      	cnt5 = (c == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (c == 7) ? cnt7 + 1:cnt7;
      
      	if (cnt5 == 2 && cnt7 == 1) {
          System.out.println("YES");
        } else {
          System.out.println("NO");
        }
    }
} Main public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
      	int cnt5 = 0;
      	int cnt7 = 0;
      	int a = sc.nextInt();
      	cnt5 = (a == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (a == 7) ? cnt7 + 1:cnt7;
      	int b = sc.nextInt();
      	cnt5 = (b == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (b == 7) ? cnt7 + 1:cnt7;
      	int c = sc.nextInt();
      	cnt5 = (c == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (c == 7) ? cnt7 + 1:cnt7;
      
      	if (cnt5 == 2 && cnt7 == 1) {
          System.out.println("YES");
        } else {
          System.out.println("NO");
        }
    } main {
    	Scanner sc = new Scanner(System.in);
      	int cnt5 = 0;
      	int cnt7 = 0;
      	int a = sc.nextInt();
      	cnt5 = (a == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (a == 7) ? cnt7 + 1:cnt7;
      	int b = sc.nextInt();
      	cnt5 = (b == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (b == 7) ? cnt7 + 1:cnt7;
      	int c = sc.nextInt();
      	cnt5 = (c == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (c == 7) ? cnt7 + 1:cnt7;
      
      	if (cnt5 == 2 && cnt7 == 1) {
          System.out.println("YES");
        } else {
          System.out.println("NO");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int cnt5 = 0; cnt5 0 int cnt7 = 0; cnt7 0 int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc cnt5 = (a == 5) ? cnt5 + 1:cnt5 cnt5 (a == 5) ? cnt5 + 1:cnt5 (a == 5) a 5 cnt5 + 1 cnt5 1 cnt5 cnt7 = (a == 7) ? cnt7 + 1:cnt7 cnt7 (a == 7) ? cnt7 + 1:cnt7 (a == 7) a 7 cnt7 + 1 cnt7 1 cnt7 int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc cnt5 = (b == 5) ? cnt5 + 1:cnt5 cnt5 (b == 5) ? cnt5 + 1:cnt5 (b == 5) b 5 cnt5 + 1 cnt5 1 cnt5 cnt7 = (b == 7) ? cnt7 + 1:cnt7 cnt7 (b == 7) ? cnt7 + 1:cnt7 (b == 7) b 7 cnt7 + 1 cnt7 1 cnt7 int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc cnt5 = (c == 5) ? cnt5 + 1:cnt5 cnt5 (c == 5) ? cnt5 + 1:cnt5 (c == 5) c 5 cnt5 + 1 cnt5 1 cnt5 cnt7 = (c == 7) ? cnt7 + 1:cnt7 cnt7 (c == 7) ? cnt7 + 1:cnt7 (c == 7) c 7 cnt7 + 1 cnt7 1 cnt7 if (cnt5 == 2 && cnt7 == 1) {
          System.out.println("YES");
        } else {
          System.out.println("NO");
        } cnt5 == 2 && cnt7 == 1 cnt5 == 2 cnt5 2 cnt7 == 1 cnt7 1 {
          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 cnt5 = 0;
      	int cnt7 = 0;
      	int a = sc.nextInt();
      	cnt5 = (a == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (a == 7) ? cnt7 + 1:cnt7;
      	int b = sc.nextInt();
      	cnt5 = (b == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (b == 7) ? cnt7 + 1:cnt7;
      	int c = sc.nextInt();
      	cnt5 = (c == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (c == 7) ? cnt7 + 1:cnt7;
      
      	if (cnt5 == 2 && cnt7 == 1) {
          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 cnt5 = 0;
      	int cnt7 = 0;
      	int a = sc.nextInt();
      	cnt5 = (a == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (a == 7) ? cnt7 + 1:cnt7;
      	int b = sc.nextInt();
      	cnt5 = (b == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (b == 7) ? cnt7 + 1:cnt7;
      	int c = sc.nextInt();
      	cnt5 = (c == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (c == 7) ? cnt7 + 1:cnt7;
      
      	if (cnt5 == 2 && cnt7 == 1) {
          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 cnt5 = 0;
      	int cnt7 = 0;
      	int a = sc.nextInt();
      	cnt5 = (a == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (a == 7) ? cnt7 + 1:cnt7;
      	int b = sc.nextInt();
      	cnt5 = (b == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (b == 7) ? cnt7 + 1:cnt7;
      	int c = sc.nextInt();
      	cnt5 = (c == 5) ? cnt5 + 1:cnt5;
      	cnt7 = (c == 7) ? cnt7 + 1:cnt7;
      
      	if (cnt5 == 2 && cnt7 == 1) {
          System.out.println("YES");
        } else {
          System.out.println("NO");
        }
    }
}
