import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        String s = sc.next();
        s += sc.next();
        s += sc.next();
        
        out.println(s.equals("575") || s.equals("557") || s.equals("755") ? "YES" : "NO");
        
        out.flush();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        String s = sc.next();
        s += sc.next();
        s += sc.next();
        
        out.println(s.equals("575") || s.equals("557") || s.equals("755") ? "YES" : "NO");
        
        out.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        String s = sc.next();
        s += sc.next();
        s += sc.next();
        
        out.println(s.equals("575") || s.equals("557") || s.equals("755") ? "YES" : "NO");
        
        out.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        String s = sc.next();
        s += sc.next();
        s += sc.next();
        
        out.println(s.equals("575") || s.equals("557") || s.equals("755") ? "YES" : "NO");
        
        out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) String s = sc.next(); s sc.next() sc.next sc s += sc.next() s sc.next() sc.next sc s += sc.next() s sc.next() sc.next sc out.println(s.equals("575") || s.equals("557") || s.equals("755") ? "YES" : "NO") out.println out s.equals("575") || s.equals("557") || s.equals("755") ? "YES" : "NO" s.equals("575") || s.equals("557") || s.equals("755") s.equals("575") || s.equals("557") || s.equals("755") s.equals("575") s.equals s "575" s.equals("557") s.equals s "557" s.equals("755") s.equals s "755" "YES" "NO" out.flush() out.flush out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        String s = sc.next();
        s += sc.next();
        s += sc.next();
        
        out.println(s.equals("575") || s.equals("557") || s.equals("755") ? "YES" : "NO");
        
        out.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        String s = sc.next();
        s += sc.next();
        s += sc.next();
        
        out.println(s.equals("575") || s.equals("557") || s.equals("755") ? "YES" : "NO");
        
        out.flush();
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        String s = sc.next();
        s += sc.next();
        s += sc.next();
        
        out.println(s.equals("575") || s.equals("557") || s.equals("755") ? "YES" : "NO");
        
        out.flush();
    }
}