import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        while (sc.hasNext()) {
            list.add(sc.nextInt());
        }
        int n5=0, n7=0;
        for (int n:list) {
            if (n==5) n5++;
            if (n==7) n7++;
        }
        System.out.println(n5==2&&n7==1 ? "YES" : "NO");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        while (sc.hasNext()) {
            list.add(sc.nextInt());
        }
        int n5=0, n7=0;
        for (int n:list) {
            if (n==5) n5++;
            if (n==7) n7++;
        }
        System.out.println(n5==2&&n7==1 ? "YES" : "NO");
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        while (sc.hasNext()) {
            list.add(sc.nextInt());
        }
        int n5=0, n7=0;
        for (int n:list) {
            if (n==5) n5++;
            if (n==7) n7++;
        }
        System.out.println(n5==2&&n7==1 ? "YES" : "NO");
    } main {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        while (sc.hasNext()) {
            list.add(sc.nextInt());
        }
        int n5=0, n7=0;
        for (int n:list) {
            if (n==5) n5++;
            if (n==7) n7++;
        }
        System.out.println(n5==2&&n7==1 ? "YES" : "NO");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) List<Integer> list = new ArrayList<>(); list new ArrayList<>() while (sc.hasNext()) {
            list.add(sc.nextInt());
        } sc.hasNext() sc.hasNext sc {
            list.add(sc.nextInt());
        } list.add(sc.nextInt()) list.add list sc.nextInt() sc.nextInt sc int n5=0 n5 0 n7=0; n7 0 for (int n:list) {
            if (n==5) n5++;
            if (n==7) n7++;
        } int n list {
            if (n==5) n5++;
            if (n==7) n7++;
        } {
            if (n==5) n5++;
            if (n==7) n7++;
        } if (n==5) n5++; n==5 n 5 n5++ n5 if (n==7) n7++; n==7 n 7 n7++ n7 System.out.println(n5==2&&n7==1 ? "YES" : "NO") System.out.println System.out System System.out n5==2&&n7==1 ? "YES" : "NO" n5==2&&n7==1 n5==2 n5 2 n7==1 n7 1 "YES" "NO" String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        while (sc.hasNext()) {
            list.add(sc.nextInt());
        }
        int n5=0, n7=0;
        for (int n:list) {
            if (n==5) n5++;
            if (n==7) n7++;
        }
        System.out.println(n5==2&&n7==1 ? "YES" : "NO");
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        while (sc.hasNext()) {
            list.add(sc.nextInt());
        }
        int n5=0, n7=0;
        for (int n:list) {
            if (n==5) n5++;
            if (n==7) n7++;
        }
        System.out.println(n5==2&&n7==1 ? "YES" : "NO");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        while (sc.hasNext()) {
            list.add(sc.nextInt());
        }
        int n5=0, n7=0;
        for (int n:list) {
            if (n==5) n5++;
            if (n==7) n7++;
        }
        System.out.println(n5==2&&n7==1 ? "YES" : "NO");
    }
}
