import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Integer[] lines = getStdinInt();
        int five = 0;
        int seven = 0;
        for(int i = 0; i < lines.length; i++){
            if(lines[i] == 5){
                five++;
            }else if(lines[i] == 7){
                seven++;
            }
        }
        if(seven == 1 && five == 2){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
    }

    private static Integer[] getStdinInt() {
        Scanner scanner = new Scanner(System.in);
        ArrayList<Integer> lines = new ArrayList<>();
        while (scanner.hasNext()) {
            lines.add(scanner.nextInt());
        }
        return lines.toArray(new Integer[lines.size()]);
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Integer[] lines = getStdinInt();
        int five = 0;
        int seven = 0;
        for(int i = 0; i < lines.length; i++){
            if(lines[i] == 5){
                five++;
            }else if(lines[i] == 7){
                seven++;
            }
        }
        if(seven == 1 && five == 2){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
    }

    private static Integer[] getStdinInt() {
        Scanner scanner = new Scanner(System.in);
        ArrayList<Integer> lines = new ArrayList<>();
        while (scanner.hasNext()) {
            lines.add(scanner.nextInt());
        }
        return lines.toArray(new Integer[lines.size()]);
    }
} Main public static void main(String[] args){
        Integer[] lines = getStdinInt();
        int five = 0;
        int seven = 0;
        for(int i = 0; i < lines.length; i++){
            if(lines[i] == 5){
                five++;
            }else if(lines[i] == 7){
                seven++;
            }
        }
        if(seven == 1 && five == 2){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
    } main {
        Integer[] lines = getStdinInt();
        int five = 0;
        int seven = 0;
        for(int i = 0; i < lines.length; i++){
            if(lines[i] == 5){
                five++;
            }else if(lines[i] == 7){
                seven++;
            }
        }
        if(seven == 1 && five == 2){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
    } Integer[] lines = getStdinInt(); lines getStdinInt() getStdinInt int five = 0; five 0 int seven = 0; seven 0 for(int i = 0; i < lines.length; i++){
            if(lines[i] == 5){
                five++;
            }else if(lines[i] == 7){
                seven++;
            }
        } int i = 0; int i = 0; i 0 i < lines.length i lines.length lines lines.length i++ i++ i {
            if(lines[i] == 5){
                five++;
            }else if(lines[i] == 7){
                seven++;
            }
        } {
            if(lines[i] == 5){
                five++;
            }else if(lines[i] == 7){
                seven++;
            }
        } if(lines[i] == 5){
                five++;
            }else if(lines[i] == 7){
                seven++;
            } lines[i] == 5 lines[i] lines i 5 {
                five++;
            } five++ five if(lines[i] == 7){
                seven++;
            } lines[i] == 7 lines[i] lines i 7 {
                seven++;
            } seven++ seven if(seven == 1 && five == 2){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        } seven == 1 && five == 2 seven == 1 seven 1 five == 2 five 2 {
            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 private static Integer[] getStdinInt() {
        Scanner scanner = new Scanner(System.in);
        ArrayList<Integer> lines = new ArrayList<>();
        while (scanner.hasNext()) {
            lines.add(scanner.nextInt());
        }
        return lines.toArray(new Integer[lines.size()]);
    } getStdinInt {
        Scanner scanner = new Scanner(System.in);
        ArrayList<Integer> lines = new ArrayList<>();
        while (scanner.hasNext()) {
            lines.add(scanner.nextInt());
        }
        return lines.toArray(new Integer[lines.size()]);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) ArrayList<Integer> lines = new ArrayList<>(); lines new ArrayList<>() while (scanner.hasNext()) {
            lines.add(scanner.nextInt());
        } scanner.hasNext() scanner.hasNext scanner {
            lines.add(scanner.nextInt());
        } lines.add(scanner.nextInt()) lines.add lines scanner.nextInt() scanner.nextInt scanner return lines.toArray(new Integer[lines.size()]); lines.toArray(new Integer[lines.size()]) lines.toArray lines new Integer[lines.size()] lines.size() lines.size lines public class Main {
    public static void main(String[] args){
        Integer[] lines = getStdinInt();
        int five = 0;
        int seven = 0;
        for(int i = 0; i < lines.length; i++){
            if(lines[i] == 5){
                five++;
            }else if(lines[i] == 7){
                seven++;
            }
        }
        if(seven == 1 && five == 2){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
    }

    private static Integer[] getStdinInt() {
        Scanner scanner = new Scanner(System.in);
        ArrayList<Integer> lines = new ArrayList<>();
        while (scanner.hasNext()) {
            lines.add(scanner.nextInt());
        }
        return lines.toArray(new Integer[lines.size()]);
    }
} public class Main {
    public static void main(String[] args){
        Integer[] lines = getStdinInt();
        int five = 0;
        int seven = 0;
        for(int i = 0; i < lines.length; i++){
            if(lines[i] == 5){
                five++;
            }else if(lines[i] == 7){
                seven++;
            }
        }
        if(seven == 1 && five == 2){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
    }

    private static Integer[] getStdinInt() {
        Scanner scanner = new Scanner(System.in);
        ArrayList<Integer> lines = new ArrayList<>();
        while (scanner.hasNext()) {
            lines.add(scanner.nextInt());
        }
        return lines.toArray(new Integer[lines.size()]);
    }
} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Integer[] lines = getStdinInt();
        int five = 0;
        int seven = 0;
        for(int i = 0; i < lines.length; i++){
            if(lines[i] == 5){
                five++;
            }else if(lines[i] == 7){
                seven++;
            }
        }
        if(seven == 1 && five == 2){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
    }

    private static Integer[] getStdinInt() {
        Scanner scanner = new Scanner(System.in);
        ArrayList<Integer> lines = new ArrayList<>();
        while (scanner.hasNext()) {
            lines.add(scanner.nextInt());
        }
        return lines.toArray(new Integer[lines.size()]);
    }
}
