import java.util.*;

public class Main {
    public static int five = 0;
    public static int seven = 0;
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String text = scanner.nextLine();
        check(text.split(" ")[0]);
        check(text.split(" ")[1]);
        check(text.split(" ")[2]);
        System.out.println(five==2 && seven ==1 ? "YES":"NO");
    }
    public static void check(String str){
        int number = Integer.parseInt(str);
        if(number==5)five++;
        if(number==7)seven++;
    }

} import java.util.*; util.* java public class Main {
    public static int five = 0;
    public static int seven = 0;
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String text = scanner.nextLine();
        check(text.split(" ")[0]);
        check(text.split(" ")[1]);
        check(text.split(" ")[2]);
        System.out.println(five==2 && seven ==1 ? "YES":"NO");
    }
    public static void check(String str){
        int number = Integer.parseInt(str);
        if(number==5)five++;
        if(number==7)seven++;
    }

} Main public static int five = 0; five 0 public static int seven = 0; seven 0 public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String text = scanner.nextLine();
        check(text.split(" ")[0]);
        check(text.split(" ")[1]);
        check(text.split(" ")[2]);
        System.out.println(five==2 && seven ==1 ? "YES":"NO");
    } main {
        Scanner scanner = new Scanner(System.in);
        String text = scanner.nextLine();
        check(text.split(" ")[0]);
        check(text.split(" ")[1]);
        check(text.split(" ")[2]);
        System.out.println(five==2 && seven ==1 ? "YES":"NO");
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String text = scanner.nextLine(); text scanner.nextLine() scanner.nextLine scanner check(text.split(" ")[0]) check text.split(" ")[0] text.split(" ") text.split text " " 0 check(text.split(" ")[1]) check text.split(" ")[1] text.split(" ") text.split text " " 1 check(text.split(" ")[2]) check text.split(" ")[2] text.split(" ") text.split text " " 2 System.out.println(five==2 && seven ==1 ? "YES":"NO") System.out.println System.out System System.out five==2 && seven ==1 ? "YES":"NO" five==2 && seven ==1 five==2 five 2 seven ==1 seven 1 "YES" "NO" String[] args args public static void check(String str){
        int number = Integer.parseInt(str);
        if(number==5)five++;
        if(number==7)seven++;
    } check {
        int number = Integer.parseInt(str);
        if(number==5)five++;
        if(number==7)seven++;
    } int number = Integer.parseInt(str); number Integer.parseInt(str) Integer.parseInt Integer str if(number==5)five++; number==5 number 5 five++ five if(number==7)seven++; number==7 number 7 seven++ seven String str str public class Main {
    public static int five = 0;
    public static int seven = 0;
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String text = scanner.nextLine();
        check(text.split(" ")[0]);
        check(text.split(" ")[1]);
        check(text.split(" ")[2]);
        System.out.println(five==2 && seven ==1 ? "YES":"NO");
    }
    public static void check(String str){
        int number = Integer.parseInt(str);
        if(number==5)five++;
        if(number==7)seven++;
    }

} public class Main {
    public static int five = 0;
    public static int seven = 0;
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String text = scanner.nextLine();
        check(text.split(" ")[0]);
        check(text.split(" ")[1]);
        check(text.split(" ")[2]);
        System.out.println(five==2 && seven ==1 ? "YES":"NO");
    }
    public static void check(String str){
        int number = Integer.parseInt(str);
        if(number==5)five++;
        if(number==7)seven++;
    }

} Main
import java.util.*;

public class Main {
    public static int five = 0;
    public static int seven = 0;
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String text = scanner.nextLine();
        check(text.split(" ")[0]);
        check(text.split(" ")[1]);
        check(text.split(" ")[2]);
        System.out.println(five==2 && seven ==1 ? "YES":"NO");
    }
    public static void check(String str){
        int number = Integer.parseInt(str);
        if(number==5)five++;
        if(number==7)seven++;
    }

}