import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) {

        int f = 2;
        int s = 1;
        String str = null;
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        try {
            str = br.readLine();

            String[] i = str.split(" ");


            for (int j = 0; j < 3; j++) {
                if (i[j].equals("5")) {
                    --f;
                } else if (i[j].equals("7")) {
                    --s;
                }
            }
        } catch (NumberFormatException e) {
            System.out.println("NO");
        } catch (IOException e) {
            System.out.println("NO");
        }
        if (f == 0 && s == 0) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

    public static void main(String[] args) {

        int f = 2;
        int s = 1;
        String str = null;
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        try {
            str = br.readLine();

            String[] i = str.split(" ");


            for (int j = 0; j < 3; j++) {
                if (i[j].equals("5")) {
                    --f;
                } else if (i[j].equals("7")) {
                    --s;
                }
            }
        } catch (NumberFormatException e) {
            System.out.println("NO");
        } catch (IOException e) {
            System.out.println("NO");
        }
        if (f == 0 && s == 0) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
} Main public static void main(String[] args) {

        int f = 2;
        int s = 1;
        String str = null;
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        try {
            str = br.readLine();

            String[] i = str.split(" ");


            for (int j = 0; j < 3; j++) {
                if (i[j].equals("5")) {
                    --f;
                } else if (i[j].equals("7")) {
                    --s;
                }
            }
        } catch (NumberFormatException e) {
            System.out.println("NO");
        } catch (IOException e) {
            System.out.println("NO");
        }
        if (f == 0 && s == 0) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    } main {

        int f = 2;
        int s = 1;
        String str = null;
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        try {
            str = br.readLine();

            String[] i = str.split(" ");


            for (int j = 0; j < 3; j++) {
                if (i[j].equals("5")) {
                    --f;
                } else if (i[j].equals("7")) {
                    --s;
                }
            }
        } catch (NumberFormatException e) {
            System.out.println("NO");
        } catch (IOException e) {
            System.out.println("NO");
        }
        if (f == 0 && s == 0) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    } int f = 2; f 2 int s = 1; s 1 String str = null; str null InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) try {
            str = br.readLine();

            String[] i = str.split(" ");


            for (int j = 0; j < 3; j++) {
                if (i[j].equals("5")) {
                    --f;
                } else if (i[j].equals("7")) {
                    --s;
                }
            }
        } catch (NumberFormatException e) {
            System.out.println("NO");
        } catch (IOException e) {
            System.out.println("NO");
        } catch (NumberFormatException e) {
            System.out.println("NO");
        } NumberFormatException e {
            System.out.println("NO");
        } System.out.println("NO") System.out.println System.out System System.out "NO" catch (IOException e) {
            System.out.println("NO");
        } IOException e {
            System.out.println("NO");
        } System.out.println("NO") System.out.println System.out System System.out "NO" {
            str = br.readLine();

            String[] i = str.split(" ");


            for (int j = 0; j < 3; j++) {
                if (i[j].equals("5")) {
                    --f;
                } else if (i[j].equals("7")) {
                    --s;
                }
            }
        } str = br.readLine() str br.readLine() br.readLine br String[] i = str.split(" "); i str.split(" ") str.split str " " for (int j = 0; j < 3; j++) {
                if (i[j].equals("5")) {
                    --f;
                } else if (i[j].equals("7")) {
                    --s;
                }
            } int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
                if (i[j].equals("5")) {
                    --f;
                } else if (i[j].equals("7")) {
                    --s;
                }
            } {
                if (i[j].equals("5")) {
                    --f;
                } else if (i[j].equals("7")) {
                    --s;
                }
            } if (i[j].equals("5")) {
                    --f;
                } else if (i[j].equals("7")) {
                    --s;
                } i[j].equals("5") i[j].equals i[j] i j "5" {
                    --f;
                } --f f if (i[j].equals("7")) {
                    --s;
                } i[j].equals("7") i[j].equals i[j] i j "7" {
                    --s;
                } --s s if (f == 0 && s == 0) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        } f == 0 && s == 0 f == 0 f 0 s == 0 s 0 {
            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) {

        int f = 2;
        int s = 1;
        String str = null;
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        try {
            str = br.readLine();

            String[] i = str.split(" ");


            for (int j = 0; j < 3; j++) {
                if (i[j].equals("5")) {
                    --f;
                } else if (i[j].equals("7")) {
                    --s;
                }
            }
        } catch (NumberFormatException e) {
            System.out.println("NO");
        } catch (IOException e) {
            System.out.println("NO");
        }
        if (f == 0 && s == 0) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
} public class Main {

    public static void main(String[] args) {

        int f = 2;
        int s = 1;
        String str = null;
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        try {
            str = br.readLine();

            String[] i = str.split(" ");


            for (int j = 0; j < 3; j++) {
                if (i[j].equals("5")) {
                    --f;
                } else if (i[j].equals("7")) {
                    --s;
                }
            }
        } catch (NumberFormatException e) {
            System.out.println("NO");
        } catch (IOException e) {
            System.out.println("NO");
        }
        if (f == 0 && s == 0) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) {

        int f = 2;
        int s = 1;
        String str = null;
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        try {
            str = br.readLine();

            String[] i = str.split(" ");


            for (int j = 0; j < 3; j++) {
                if (i[j].equals("5")) {
                    --f;
                } else if (i[j].equals("7")) {
                    --s;
                }
            }
        } catch (NumberFormatException e) {
            System.out.println("NO");
        } catch (IOException e) {
            System.out.println("NO");
        }
        if (f == 0 && s == 0) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
}