import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scan = new Scanner(System.in);
        
        Map<Integer, Integer> input = new HashMap<Integer, Integer>();
        
        int in = 0;
        int x = 0;
        
        for(int i = 0 ; i < 3 ; i++){
            in = scan.nextInt();
            if(input.get(in) != null){
                x = input.get(in);
                x = x + 1;
                input.put(in, x);
            }else{
                input.put(in, 1);
            }
        }
        
        int number5 = 0;
        int number7 = 0;
        String ans = "NO";
        
        number5 = input.get(5);
        if(number5 != 0){
            if(number5 == 2){
            number7 = input.get(7);
                if(number7 != 0){
                    if(number7 == 1){
                        ans = "YES";
                    }
                }
            }
        }
        
        System.out.println(ans);
        
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scan = new Scanner(System.in);
        
        Map<Integer, Integer> input = new HashMap<Integer, Integer>();
        
        int in = 0;
        int x = 0;
        
        for(int i = 0 ; i < 3 ; i++){
            in = scan.nextInt();
            if(input.get(in) != null){
                x = input.get(in);
                x = x + 1;
                input.put(in, x);
            }else{
                input.put(in, 1);
            }
        }
        
        int number5 = 0;
        int number7 = 0;
        String ans = "NO";
        
        number5 = input.get(5);
        if(number5 != 0){
            if(number5 == 2){
            number7 = input.get(7);
                if(number7 != 0){
                    if(number7 == 1){
                        ans = "YES";
                    }
                }
            }
        }
        
        System.out.println(ans);
        
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner scan = new Scanner(System.in);
        
        Map<Integer, Integer> input = new HashMap<Integer, Integer>();
        
        int in = 0;
        int x = 0;
        
        for(int i = 0 ; i < 3 ; i++){
            in = scan.nextInt();
            if(input.get(in) != null){
                x = input.get(in);
                x = x + 1;
                input.put(in, x);
            }else{
                input.put(in, 1);
            }
        }
        
        int number5 = 0;
        int number7 = 0;
        String ans = "NO";
        
        number5 = input.get(5);
        if(number5 != 0){
            if(number5 == 2){
            number7 = input.get(7);
                if(number7 != 0){
                    if(number7 == 1){
                        ans = "YES";
                    }
                }
            }
        }
        
        System.out.println(ans);
        
    } main {
        
        Scanner scan = new Scanner(System.in);
        
        Map<Integer, Integer> input = new HashMap<Integer, Integer>();
        
        int in = 0;
        int x = 0;
        
        for(int i = 0 ; i < 3 ; i++){
            in = scan.nextInt();
            if(input.get(in) != null){
                x = input.get(in);
                x = x + 1;
                input.put(in, x);
            }else{
                input.put(in, 1);
            }
        }
        
        int number5 = 0;
        int number7 = 0;
        String ans = "NO";
        
        number5 = input.get(5);
        if(number5 != 0){
            if(number5 == 2){
            number7 = input.get(7);
                if(number7 != 0){
                    if(number7 == 1){
                        ans = "YES";
                    }
                }
            }
        }
        
        System.out.println(ans);
        
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) Map<Integer, Integer> input = new HashMap<Integer, Integer>(); input new HashMap<Integer, Integer>() int in = 0; in 0 int x = 0; x 0 for(int i = 0 ; i < 3 ; i++){
            in = scan.nextInt();
            if(input.get(in) != null){
                x = input.get(in);
                x = x + 1;
                input.put(in, x);
            }else{
                input.put(in, 1);
            }
        } int i = 0 ; int i = 0 ; i 0 i < 3 i 3 i++ i++ i {
            in = scan.nextInt();
            if(input.get(in) != null){
                x = input.get(in);
                x = x + 1;
                input.put(in, x);
            }else{
                input.put(in, 1);
            }
        } {
            in = scan.nextInt();
            if(input.get(in) != null){
                x = input.get(in);
                x = x + 1;
                input.put(in, x);
            }else{
                input.put(in, 1);
            }
        } in = scan.nextInt() in scan.nextInt() scan.nextInt scan if(input.get(in) != null){
                x = input.get(in);
                x = x + 1;
                input.put(in, x);
            }else{
                input.put(in, 1);
            } input.get(in) != null input.get(in) input.get input in null {
                x = input.get(in);
                x = x + 1;
                input.put(in, x);
            } x = input.get(in) x input.get(in) input.get input in x = x + 1 x x + 1 x 1 input.put(in, x) input.put input in x {
                input.put(in, 1);
            } input.put(in, 1) input.put input in 1 int number5 = 0; number5 0 int number7 = 0; number7 0 String ans = "NO"; ans "NO" number5 = input.get(5) number5 input.get(5) input.get input 5 if(number5 != 0){
            if(number5 == 2){
            number7 = input.get(7);
                if(number7 != 0){
                    if(number7 == 1){
                        ans = "YES";
                    }
                }
            }
        } number5 != 0 number5 0 {
            if(number5 == 2){
            number7 = input.get(7);
                if(number7 != 0){
                    if(number7 == 1){
                        ans = "YES";
                    }
                }
            }
        } if(number5 == 2){
            number7 = input.get(7);
                if(number7 != 0){
                    if(number7 == 1){
                        ans = "YES";
                    }
                }
            } number5 == 2 number5 2 {
            number7 = input.get(7);
                if(number7 != 0){
                    if(number7 == 1){
                        ans = "YES";
                    }
                }
            } number7 = input.get(7) number7 input.get(7) input.get input 7 if(number7 != 0){
                    if(number7 == 1){
                        ans = "YES";
                    }
                } number7 != 0 number7 0 {
                    if(number7 == 1){
                        ans = "YES";
                    }
                } if(number7 == 1){
                        ans = "YES";
                    } number7 == 1 number7 1 {
                        ans = "YES";
                    } ans = "YES" ans "YES" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scan = new Scanner(System.in);
        
        Map<Integer, Integer> input = new HashMap<Integer, Integer>();
        
        int in = 0;
        int x = 0;
        
        for(int i = 0 ; i < 3 ; i++){
            in = scan.nextInt();
            if(input.get(in) != null){
                x = input.get(in);
                x = x + 1;
                input.put(in, x);
            }else{
                input.put(in, 1);
            }
        }
        
        int number5 = 0;
        int number7 = 0;
        String ans = "NO";
        
        number5 = input.get(5);
        if(number5 != 0){
            if(number5 == 2){
            number7 = input.get(7);
                if(number7 != 0){
                    if(number7 == 1){
                        ans = "YES";
                    }
                }
            }
        }
        
        System.out.println(ans);
        
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scan = new Scanner(System.in);
        
        Map<Integer, Integer> input = new HashMap<Integer, Integer>();
        
        int in = 0;
        int x = 0;
        
        for(int i = 0 ; i < 3 ; i++){
            in = scan.nextInt();
            if(input.get(in) != null){
                x = input.get(in);
                x = x + 1;
                input.put(in, x);
            }else{
                input.put(in, 1);
            }
        }
        
        int number5 = 0;
        int number7 = 0;
        String ans = "NO";
        
        number5 = input.get(5);
        if(number5 != 0){
            if(number5 == 2){
            number7 = input.get(7);
                if(number7 != 0){
                    if(number7 == 1){
                        ans = "YES";
                    }
                }
            }
        }
        
        System.out.println(ans);
        
    }
} Main
import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scan = new Scanner(System.in);
        
        Map<Integer, Integer> input = new HashMap<Integer, Integer>();
        
        int in = 0;
        int x = 0;
        
        for(int i = 0 ; i < 3 ; i++){
            in = scan.nextInt();
            if(input.get(in) != null){
                x = input.get(in);
                x = x + 1;
                input.put(in, x);
            }else{
                input.put(in, 1);
            }
        }
        
        int number5 = 0;
        int number7 = 0;
        String ans = "NO";
        
        number5 = input.get(5);
        if(number5 != 0){
            if(number5 == 2){
            number7 = input.get(7);
                if(number7 != 0){
                    if(number7 == 1){
                        ans = "YES";
                    }
                }
            }
        }
        
        System.out.println(ans);
        
    }
}