import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		String []arr_input = input.split(" ");
		int aux_5 = 0;
		int aux_7 = 0;
		for(int i=0; i<arr_input.length; i++) {
			int value = Integer.parseInt(arr_input[i]);
			if(value==5)aux_5++;
			if(value==7)aux_7++;
		}
		String r = (aux_5==2 && aux_7==1)?"YES":"NO";
		System.out.println(r);
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		String []arr_input = input.split(" ");
		int aux_5 = 0;
		int aux_7 = 0;
		for(int i=0; i<arr_input.length; i++) {
			int value = Integer.parseInt(arr_input[i]);
			if(value==5)aux_5++;
			if(value==7)aux_7++;
		}
		String r = (aux_5==2 && aux_7==1)?"YES":"NO";
		System.out.println(r);
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		String []arr_input = input.split(" ");
		int aux_5 = 0;
		int aux_7 = 0;
		for(int i=0; i<arr_input.length; i++) {
			int value = Integer.parseInt(arr_input[i]);
			if(value==5)aux_5++;
			if(value==7)aux_7++;
		}
		String r = (aux_5==2 && aux_7==1)?"YES":"NO";
		System.out.println(r);
	} main {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		String []arr_input = input.split(" ");
		int aux_5 = 0;
		int aux_7 = 0;
		for(int i=0; i<arr_input.length; i++) {
			int value = Integer.parseInt(arr_input[i]);
			if(value==5)aux_5++;
			if(value==7)aux_7++;
		}
		String r = (aux_5==2 && aux_7==1)?"YES":"NO";
		System.out.println(r);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String input = scanner.nextLine(); input scanner.nextLine() scanner.nextLine scanner String []arr_input = input.split(" "); arr_input input.split(" ") input.split input " " int aux_5 = 0; aux_5 0 int aux_7 = 0; aux_7 0 for(int i=0; i<arr_input.length; i++) {
			int value = Integer.parseInt(arr_input[i]);
			if(value==5)aux_5++;
			if(value==7)aux_7++;
		} int i=0; int i=0; i 0 i<arr_input.length i arr_input.length arr_input arr_input.length i++ i++ i {
			int value = Integer.parseInt(arr_input[i]);
			if(value==5)aux_5++;
			if(value==7)aux_7++;
		} {
			int value = Integer.parseInt(arr_input[i]);
			if(value==5)aux_5++;
			if(value==7)aux_7++;
		} int value = Integer.parseInt(arr_input[i]); value Integer.parseInt(arr_input[i]) Integer.parseInt Integer arr_input[i] arr_input i if(value==5)aux_5++; value==5 value 5 aux_5++ aux_5 if(value==7)aux_7++; value==7 value 7 aux_7++ aux_7 String r = (aux_5==2 && aux_7==1)?"YES":"NO"; r (aux_5==2 && aux_7==1)?"YES":"NO" (aux_5==2 && aux_7==1) aux_5==2 aux_5 2 aux_7==1 aux_7 1 "YES" "NO" System.out.println(r) System.out.println System.out System System.out r String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		String []arr_input = input.split(" ");
		int aux_5 = 0;
		int aux_7 = 0;
		for(int i=0; i<arr_input.length; i++) {
			int value = Integer.parseInt(arr_input[i]);
			if(value==5)aux_5++;
			if(value==7)aux_7++;
		}
		String r = (aux_5==2 && aux_7==1)?"YES":"NO";
		System.out.println(r);
	}
}