import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int seven = 0;
		int five = 0;
		while (sc.hasNext()) {
			int num = sc.nextInt();
			if (num == 7) {
				seven++;
			} else if (num == 5) {
				five++;
			}
		}
		if (seven == 1 && five == 2) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int seven = 0;
		int five = 0;
		while (sc.hasNext()) {
			int num = sc.nextInt();
			if (num == 7) {
				seven++;
			} else if (num == 5) {
				five++;
			}
		}
		if (seven == 1 && five == 2) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int seven = 0;
		int five = 0;
		while (sc.hasNext()) {
			int num = sc.nextInt();
			if (num == 7) {
				seven++;
			} else if (num == 5) {
				five++;
			}
		}
		if (seven == 1 && five == 2) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}

	} main {
		Scanner sc = new Scanner(System.in);
		int seven = 0;
		int five = 0;
		while (sc.hasNext()) {
			int num = sc.nextInt();
			if (num == 7) {
				seven++;
			} else if (num == 5) {
				five++;
			}
		}
		if (seven == 1 && five == 2) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int seven = 0; seven 0 int five = 0; five 0 while (sc.hasNext()) {
			int num = sc.nextInt();
			if (num == 7) {
				seven++;
			} else if (num == 5) {
				five++;
			}
		} sc.hasNext() sc.hasNext sc {
			int num = sc.nextInt();
			if (num == 7) {
				seven++;
			} else if (num == 5) {
				five++;
			}
		} int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc if (num == 7) {
				seven++;
			} else if (num == 5) {
				five++;
			} num == 7 num 7 {
				seven++;
			} seven++ seven if (num == 5) {
				five++;
			} num == 5 num 5 {
				five++;
			} five++ five if (seven == 1 && five == 2) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		} seven == 1 && five == 2 seven == 1 seven 1 five == 2 five 2 {
			System.out.println("YES");
		} System.out.println("YES") System.out.println System.out System System.out "YES" {
			System.out.println("NO");
		} System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int seven = 0;
		int five = 0;
		while (sc.hasNext()) {
			int num = sc.nextInt();
			if (num == 7) {
				seven++;
			} else if (num == 5) {
				five++;
			}
		}
		if (seven == 1 && five == 2) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}

	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int seven = 0;
		int five = 0;
		while (sc.hasNext()) {
			int num = sc.nextInt();
			if (num == 7) {
				seven++;
			} else if (num == 5) {
				five++;
			}
		}
		if (seven == 1 && five == 2) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}

	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int seven = 0;
		int five = 0;
		while (sc.hasNext()) {
			int num = sc.nextInt();
			if (num == 7) {
				seven++;
			} else if (num == 5) {
				five++;
			}
		}
		if (seven == 1 && five == 2) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}

	}
}