import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int fiveCount = 0;
		int sevenCount = 0;
		int total = 0;

	    int[] array = new int[3];
	    for(int i = 0; i<3; i++){
	        array[i] = sc.nextInt();
	    }

	    for(int i = 0; i < array.length; i++) {
	    	total += array[i];
	    	if(array[i] == 5) {
	    		fiveCount++;
	    	}else if(array[i] == 7) {
	    		sevenCount++;
	    	}
	    }

		if(total != 17) {
			System.out.println("NO");
		}else if(fiveCount != 2 && sevenCount != 1) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int fiveCount = 0;
		int sevenCount = 0;
		int total = 0;

	    int[] array = new int[3];
	    for(int i = 0; i<3; i++){
	        array[i] = sc.nextInt();
	    }

	    for(int i = 0; i < array.length; i++) {
	    	total += array[i];
	    	if(array[i] == 5) {
	    		fiveCount++;
	    	}else if(array[i] == 7) {
	    		sevenCount++;
	    	}
	    }

		if(total != 17) {
			System.out.println("NO");
		}else if(fiveCount != 2 && sevenCount != 1) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int fiveCount = 0;
		int sevenCount = 0;
		int total = 0;

	    int[] array = new int[3];
	    for(int i = 0; i<3; i++){
	        array[i] = sc.nextInt();
	    }

	    for(int i = 0; i < array.length; i++) {
	    	total += array[i];
	    	if(array[i] == 5) {
	    		fiveCount++;
	    	}else if(array[i] == 7) {
	    		sevenCount++;
	    	}
	    }

		if(total != 17) {
			System.out.println("NO");
		}else if(fiveCount != 2 && sevenCount != 1) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int fiveCount = 0;
		int sevenCount = 0;
		int total = 0;

	    int[] array = new int[3];
	    for(int i = 0; i<3; i++){
	        array[i] = sc.nextInt();
	    }

	    for(int i = 0; i < array.length; i++) {
	    	total += array[i];
	    	if(array[i] == 5) {
	    		fiveCount++;
	    	}else if(array[i] == 7) {
	    		sevenCount++;
	    	}
	    }

		if(total != 17) {
			System.out.println("NO");
		}else if(fiveCount != 2 && sevenCount != 1) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int fiveCount = 0; fiveCount 0 int sevenCount = 0; sevenCount 0 int total = 0; total 0 int[] array = new int[3]; array new int[3] 3 for(int i = 0; i<3; i++){
	        array[i] = sc.nextInt();
	    } int i = 0; int i = 0; i 0 i<3 i 3 i++ i++ i {
	        array[i] = sc.nextInt();
	    } {
	        array[i] = sc.nextInt();
	    } array[i] = sc.nextInt() array[i] array i sc.nextInt() sc.nextInt sc for(int i = 0; i < array.length; i++) {
	    	total += array[i];
	    	if(array[i] == 5) {
	    		fiveCount++;
	    	}else if(array[i] == 7) {
	    		sevenCount++;
	    	}
	    } int i = 0; int i = 0; i 0 i < array.length i array.length array array.length i++ i++ i {
	    	total += array[i];
	    	if(array[i] == 5) {
	    		fiveCount++;
	    	}else if(array[i] == 7) {
	    		sevenCount++;
	    	}
	    } {
	    	total += array[i];
	    	if(array[i] == 5) {
	    		fiveCount++;
	    	}else if(array[i] == 7) {
	    		sevenCount++;
	    	}
	    } total += array[i] total array[i] array i if(array[i] == 5) {
	    		fiveCount++;
	    	}else if(array[i] == 7) {
	    		sevenCount++;
	    	} array[i] == 5 array[i] array i 5 {
	    		fiveCount++;
	    	} fiveCount++ fiveCount if(array[i] == 7) {
	    		sevenCount++;
	    	} array[i] == 7 array[i] array i 7 {
	    		sevenCount++;
	    	} sevenCount++ sevenCount if(total != 17) {
			System.out.println("NO");
		}else if(fiveCount != 2 && sevenCount != 1) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		} total != 17 total 17 {
			System.out.println("NO");
		} System.out.println("NO") System.out.println System.out System System.out "NO" if(fiveCount != 2 && sevenCount != 1) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		} fiveCount != 2 && sevenCount != 1 fiveCount != 2 fiveCount 2 sevenCount != 1 sevenCount 1 {
			System.out.println("NO");
		} System.out.println("NO") System.out.println System.out System System.out "NO" {
			System.out.println("YES");
		} System.out.println("YES") System.out.println System.out System System.out "YES" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int fiveCount = 0;
		int sevenCount = 0;
		int total = 0;

	    int[] array = new int[3];
	    for(int i = 0; i<3; i++){
	        array[i] = sc.nextInt();
	    }

	    for(int i = 0; i < array.length; i++) {
	    	total += array[i];
	    	if(array[i] == 5) {
	    		fiveCount++;
	    	}else if(array[i] == 7) {
	    		sevenCount++;
	    	}
	    }

		if(total != 17) {
			System.out.println("NO");
		}else if(fiveCount != 2 && sevenCount != 1) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int fiveCount = 0;
		int sevenCount = 0;
		int total = 0;

	    int[] array = new int[3];
	    for(int i = 0; i<3; i++){
	        array[i] = sc.nextInt();
	    }

	    for(int i = 0; i < array.length; i++) {
	    	total += array[i];
	    	if(array[i] == 5) {
	    		fiveCount++;
	    	}else if(array[i] == 7) {
	    		sevenCount++;
	    	}
	    }

		if(total != 17) {
			System.out.println("NO");
		}else if(fiveCount != 2 && sevenCount != 1) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int fiveCount = 0;
		int sevenCount = 0;
		int total = 0;

	    int[] array = new int[3];
	    for(int i = 0; i<3; i++){
	        array[i] = sc.nextInt();
	    }

	    for(int i = 0; i < array.length; i++) {
	    	total += array[i];
	    	if(array[i] == 5) {
	    		fiveCount++;
	    	}else if(array[i] == 7) {
	    		sevenCount++;
	    	}
	    }

		if(total != 17) {
			System.out.println("NO");
		}else if(fiveCount != 2 && sevenCount != 1) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		}
	}
}
