import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        // int[] a = new int[3];
        // int five = 0;
        // int seven = 0;

        // for(int i = 0; i < a.length; i++){
        //     // System.out.println(i + "文字目を入力してください");
        //     a[i] = sc.nextInt();
        // }
        // for(int i = 0; i < a.length; i++){
        //     if(a[i] == 5){
        //         five++;
        //     } else if(a[i] == 7){
        //         seven++;
        //     }
        // }
        // if(five == 2 && seven == 1){
        //     System.out.println("YES");
        // }else{
        //     System.out.println("NO");
        // }
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int five = 0;
        int seven = 0;

        if(a == 5){
            five++;
        }else if(a == 7){
            seven++;
        }
        if(b == 5){
            five++;
        }else if(b == 7){
            seven++;
        }
        if(c == 5){
            five++;
        }else if(c == 7){
            seven++;
        }
        if(five == 2&&seven == 1){
            System.out.println("YES");
        }else {
            System.out.println("NO");
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        // int[] a = new int[3];
        // int five = 0;
        // int seven = 0;

        // for(int i = 0; i < a.length; i++){
        //     // System.out.println(i + "文字目を入力してください");
        //     a[i] = sc.nextInt();
        // }
        // for(int i = 0; i < a.length; i++){
        //     if(a[i] == 5){
        //         five++;
        //     } else if(a[i] == 7){
        //         seven++;
        //     }
        // }
        // if(five == 2 && seven == 1){
        //     System.out.println("YES");
        // }else{
        //     System.out.println("NO");
        // }
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int five = 0;
        int seven = 0;

        if(a == 5){
            five++;
        }else if(a == 7){
            seven++;
        }
        if(b == 5){
            five++;
        }else if(b == 7){
            seven++;
        }
        if(c == 5){
            five++;
        }else 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) throws Exception {
        Scanner sc = new Scanner(System.in);
        // int[] a = new int[3];
        // int five = 0;
        // int seven = 0;

        // for(int i = 0; i < a.length; i++){
        //     // System.out.println(i + "文字目を入力してください");
        //     a[i] = sc.nextInt();
        // }
        // for(int i = 0; i < a.length; i++){
        //     if(a[i] == 5){
        //         five++;
        //     } else if(a[i] == 7){
        //         seven++;
        //     }
        // }
        // if(five == 2 && seven == 1){
        //     System.out.println("YES");
        // }else{
        //     System.out.println("NO");
        // }
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int five = 0;
        int seven = 0;

        if(a == 5){
            five++;
        }else if(a == 7){
            seven++;
        }
        if(b == 5){
            five++;
        }else if(b == 7){
            seven++;
        }
        if(c == 5){
            five++;
        }else 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[] a = new int[3];
        // int five = 0;
        // int seven = 0;

        // for(int i = 0; i < a.length; i++){
        //     // System.out.println(i + "文字目を入力してください");
        //     a[i] = sc.nextInt();
        // }
        // for(int i = 0; i < a.length; i++){
        //     if(a[i] == 5){
        //         five++;
        //     } else if(a[i] == 7){
        //         seven++;
        //     }
        // }
        // if(five == 2 && seven == 1){
        //     System.out.println("YES");
        // }else{
        //     System.out.println("NO");
        // }
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int five = 0;
        int seven = 0;

        if(a == 5){
            five++;
        }else if(a == 7){
            seven++;
        }
        if(b == 5){
            five++;
        }else if(b == 7){
            seven++;
        }
        if(c == 5){
            five++;
        }else 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 a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int five = 0; five 0 int seven = 0; seven 0 if(a == 5){
            five++;
        }else if(a == 7){
            seven++;
        } a == 5 a 5 {
            five++;
        } five++ five if(a == 7){
            seven++;
        } a == 7 a 7 {
            seven++;
        } seven++ seven if(b == 5){
            five++;
        }else if(b == 7){
            seven++;
        } b == 5 b 5 {
            five++;
        } five++ five if(b == 7){
            seven++;
        } b == 7 b 7 {
            seven++;
        } seven++ seven if(c == 5){
            five++;
        }else if(c == 7){
            seven++;
        } c == 5 c 5 {
            five++;
        } five++ five if(c == 7){
            seven++;
        } c == 7 c 7 {
            seven++;
        } 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("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) throws Exception {
        Scanner sc = new Scanner(System.in);
        // int[] a = new int[3];
        // int five = 0;
        // int seven = 0;

        // for(int i = 0; i < a.length; i++){
        //     // System.out.println(i + "文字目を入力してください");
        //     a[i] = sc.nextInt();
        // }
        // for(int i = 0; i < a.length; i++){
        //     if(a[i] == 5){
        //         five++;
        //     } else if(a[i] == 7){
        //         seven++;
        //     }
        // }
        // if(five == 2 && seven == 1){
        //     System.out.println("YES");
        // }else{
        //     System.out.println("NO");
        // }
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int five = 0;
        int seven = 0;

        if(a == 5){
            five++;
        }else if(a == 7){
            seven++;
        }
        if(b == 5){
            five++;
        }else if(b == 7){
            seven++;
        }
        if(c == 5){
            five++;
        }else 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) throws Exception {
        Scanner sc = new Scanner(System.in);
        // int[] a = new int[3];
        // int five = 0;
        // int seven = 0;

        // for(int i = 0; i < a.length; i++){
        //     // System.out.println(i + "文字目を入力してください");
        //     a[i] = sc.nextInt();
        // }
        // for(int i = 0; i < a.length; i++){
        //     if(a[i] == 5){
        //         five++;
        //     } else if(a[i] == 7){
        //         seven++;
        //     }
        // }
        // if(five == 2 && seven == 1){
        //     System.out.println("YES");
        // }else{
        //     System.out.println("NO");
        // }
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int five = 0;
        int seven = 0;

        if(a == 5){
            five++;
        }else if(a == 7){
            seven++;
        }
        if(b == 5){
            five++;
        }else if(b == 7){
            seven++;
        }
        if(c == 5){
            five++;
        }else if(c == 7){
            seven++;
        }
        if(five == 2&&seven == 1){
            System.out.println("YES");
        }else {
            System.out.println("NO");
        }
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        // int[] a = new int[3];
        // int five = 0;
        // int seven = 0;

        // for(int i = 0; i < a.length; i++){
        //     // System.out.println(i + "文字目を入力してください");
        //     a[i] = sc.nextInt();
        // }
        // for(int i = 0; i < a.length; i++){
        //     if(a[i] == 5){
        //         five++;
        //     } else if(a[i] == 7){
        //         seven++;
        //     }
        // }
        // if(five == 2 && seven == 1){
        //     System.out.println("YES");
        // }else{
        //     System.out.println("NO");
        // }
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int five = 0;
        int seven = 0;

        if(a == 5){
            five++;
        }else if(a == 7){
            seven++;
        }
        if(b == 5){
            five++;
        }else if(b == 7){
            seven++;
        }
        if(c == 5){
            five++;
        }else if(c == 7){
            seven++;
        }
        if(five == 2&&seven == 1){
            System.out.println("YES");
        }else {
            System.out.println("NO");
        }
    }
}