import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		System.out.println(
				Arrays.stream(scanner.nextLine().split(" ")).sorted().collect(Collectors.toList()).equals(Arrays.asList("5", "5", "7")) ?
					"YES" : "NO");
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util import java.util.stream.Collectors; Collectors java.util.stream public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		System.out.println(
				Arrays.stream(scanner.nextLine().split(" ")).sorted().collect(Collectors.toList()).equals(Arrays.asList("5", "5", "7")) ?
					"YES" : "NO");
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		System.out.println(
				Arrays.stream(scanner.nextLine().split(" ")).sorted().collect(Collectors.toList()).equals(Arrays.asList("5", "5", "7")) ?
					"YES" : "NO");
	} main {
		Scanner scanner = new Scanner(System.in);
		System.out.println(
				Arrays.stream(scanner.nextLine().split(" ")).sorted().collect(Collectors.toList()).equals(Arrays.asList("5", "5", "7")) ?
					"YES" : "NO");
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) System.out.println(
				Arrays.stream(scanner.nextLine().split(" ")).sorted().collect(Collectors.toList()).equals(Arrays.asList("5", "5", "7")) ?
					"YES" : "NO") System.out.println System.out System System.out Arrays.stream(scanner.nextLine().split(" ")).sorted().collect(Collectors.toList()).equals(Arrays.asList("5", "5", "7")) ?
					"YES" : "NO" Arrays.stream(scanner.nextLine().split(" ")).sorted().collect(Collectors.toList()).equals(Arrays.asList("5", "5", "7")) Arrays.stream(scanner.nextLine().split(" ")).sorted().collect(Collectors.toList()).equals Arrays.stream(scanner.nextLine().split(" ")).sorted().collect(Collectors.toList()) Arrays.stream(scanner.nextLine().split(" ")).sorted().collect Arrays.stream(scanner.nextLine().split(" ")).sorted() Arrays.stream(scanner.nextLine().split(" ")).sorted Arrays.stream(scanner.nextLine().split(" ")) Arrays.stream Arrays scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " Collectors.toList() Collectors.toList Collectors Arrays.asList("5", "5", "7") Arrays.asList Arrays "5" "5" "7" "YES" "NO" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		System.out.println(
				Arrays.stream(scanner.nextLine().split(" ")).sorted().collect(Collectors.toList()).equals(Arrays.asList("5", "5", "7")) ?
					"YES" : "NO");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		System.out.println(
				Arrays.stream(scanner.nextLine().split(" ")).sorted().collect(Collectors.toList()).equals(Arrays.asList("5", "5", "7")) ?
					"YES" : "NO");
	}
} Main
import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		System.out.println(
				Arrays.stream(scanner.nextLine().split(" ")).sorted().collect(Collectors.toList()).equals(Arrays.asList("5", "5", "7")) ?
					"YES" : "NO");
	}
}