import java.util.Scanner;

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