import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		final String FIVE  = "5";
		final String SEVEN = "7";
		
		Scanner scanner = new Scanner(System.in);		
		String input = scanner.nextLine();
		scanner.close();
		
		String[] arrStr = (input.split(" ",0));

		int fivCnt = 0;
		int sevCnt = 0;
		
		for(String num : arrStr) {
			if(num.equals(FIVE)) {
				fivCnt ++;
			} else if(num.equals(SEVEN)) {
				sevCnt ++;
			}
		}
		
		String res;
		if(fivCnt == 2 && sevCnt == 1) {
			res = "YES";
		}else {
			res= "NO";
		}
		System.out.println(res);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		final String FIVE  = "5";
		final String SEVEN = "7";
		
		Scanner scanner = new Scanner(System.in);		
		String input = scanner.nextLine();
		scanner.close();
		
		String[] arrStr = (input.split(" ",0));

		int fivCnt = 0;
		int sevCnt = 0;
		
		for(String num : arrStr) {
			if(num.equals(FIVE)) {
				fivCnt ++;
			} else if(num.equals(SEVEN)) {
				sevCnt ++;
			}
		}
		
		String res;
		if(fivCnt == 2 && sevCnt == 1) {
			res = "YES";
		}else {
			res= "NO";
		}
		System.out.println(res);
	}
} Main public static void main(String[] args) {

		final String FIVE  = "5";
		final String SEVEN = "7";
		
		Scanner scanner = new Scanner(System.in);		
		String input = scanner.nextLine();
		scanner.close();
		
		String[] arrStr = (input.split(" ",0));

		int fivCnt = 0;
		int sevCnt = 0;
		
		for(String num : arrStr) {
			if(num.equals(FIVE)) {
				fivCnt ++;
			} else if(num.equals(SEVEN)) {
				sevCnt ++;
			}
		}
		
		String res;
		if(fivCnt == 2 && sevCnt == 1) {
			res = "YES";
		}else {
			res= "NO";
		}
		System.out.println(res);
	} main {

		final String FIVE  = "5";
		final String SEVEN = "7";
		
		Scanner scanner = new Scanner(System.in);		
		String input = scanner.nextLine();
		scanner.close();
		
		String[] arrStr = (input.split(" ",0));

		int fivCnt = 0;
		int sevCnt = 0;
		
		for(String num : arrStr) {
			if(num.equals(FIVE)) {
				fivCnt ++;
			} else if(num.equals(SEVEN)) {
				sevCnt ++;
			}
		}
		
		String res;
		if(fivCnt == 2 && sevCnt == 1) {
			res = "YES";
		}else {
			res= "NO";
		}
		System.out.println(res);
	} final String FIVE  = "5"; FIVE "5" final String SEVEN = "7"; SEVEN "7" Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String input = scanner.nextLine(); input scanner.nextLine() scanner.nextLine scanner scanner.close() scanner.close scanner String[] arrStr = (input.split(" ",0)); arrStr (input.split(" ",0)) input.split input " " 0 int fivCnt = 0; fivCnt 0 int sevCnt = 0; sevCnt 0 for(String num : arrStr) {
			if(num.equals(FIVE)) {
				fivCnt ++;
			} else if(num.equals(SEVEN)) {
				sevCnt ++;
			}
		} String num arrStr {
			if(num.equals(FIVE)) {
				fivCnt ++;
			} else if(num.equals(SEVEN)) {
				sevCnt ++;
			}
		} {
			if(num.equals(FIVE)) {
				fivCnt ++;
			} else if(num.equals(SEVEN)) {
				sevCnt ++;
			}
		} if(num.equals(FIVE)) {
				fivCnt ++;
			} else if(num.equals(SEVEN)) {
				sevCnt ++;
			} num.equals(FIVE) num.equals num FIVE {
				fivCnt ++;
			} fivCnt ++ fivCnt if(num.equals(SEVEN)) {
				sevCnt ++;
			} num.equals(SEVEN) num.equals num SEVEN {
				sevCnt ++;
			} sevCnt ++ sevCnt String res; res if(fivCnt == 2 && sevCnt == 1) {
			res = "YES";
		}else {
			res= "NO";
		} fivCnt == 2 && sevCnt == 1 fivCnt == 2 fivCnt 2 sevCnt == 1 sevCnt 1 {
			res = "YES";
		} res = "YES" res "YES" {
			res= "NO";
		} res= "NO" res "NO" System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {

	public static void main(String[] args) {

		final String FIVE  = "5";
		final String SEVEN = "7";
		
		Scanner scanner = new Scanner(System.in);		
		String input = scanner.nextLine();
		scanner.close();
		
		String[] arrStr = (input.split(" ",0));

		int fivCnt = 0;
		int sevCnt = 0;
		
		for(String num : arrStr) {
			if(num.equals(FIVE)) {
				fivCnt ++;
			} else if(num.equals(SEVEN)) {
				sevCnt ++;
			}
		}
		
		String res;
		if(fivCnt == 2 && sevCnt == 1) {
			res = "YES";
		}else {
			res= "NO";
		}
		System.out.println(res);
	}
} public class Main {

	public static void main(String[] args) {

		final String FIVE  = "5";
		final String SEVEN = "7";
		
		Scanner scanner = new Scanner(System.in);		
		String input = scanner.nextLine();
		scanner.close();
		
		String[] arrStr = (input.split(" ",0));

		int fivCnt = 0;
		int sevCnt = 0;
		
		for(String num : arrStr) {
			if(num.equals(FIVE)) {
				fivCnt ++;
			} else if(num.equals(SEVEN)) {
				sevCnt ++;
			}
		}
		
		String res;
		if(fivCnt == 2 && sevCnt == 1) {
			res = "YES";
		}else {
			res= "NO";
		}
		System.out.println(res);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		final String FIVE  = "5";
		final String SEVEN = "7";
		
		Scanner scanner = new Scanner(System.in);		
		String input = scanner.nextLine();
		scanner.close();
		
		String[] arrStr = (input.split(" ",0));

		int fivCnt = 0;
		int sevCnt = 0;
		
		for(String num : arrStr) {
			if(num.equals(FIVE)) {
				fivCnt ++;
			} else if(num.equals(SEVEN)) {
				sevCnt ++;
			}
		}
		
		String res;
		if(fivCnt == 2 && sevCnt == 1) {
			res = "YES";
		}else {
			res= "NO";
		}
		System.out.println(res);
	}
}
