import java.util.Scanner;

public class Main {

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

			int inputCount = 0;
			while (inputCount < 3) {
				int abc = sc.nextInt();

				if (abc == 5) {
					fiveCount++;
				} else if (abc == 7) {
					sevenCount++;
				}
				inputCount++;
			}

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

		} finally {
			sc.close();
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

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

			int inputCount = 0;
			while (inputCount < 3) {
				int abc = sc.nextInt();

				if (abc == 5) {
					fiveCount++;
				} else if (abc == 7) {
					sevenCount++;
				}
				inputCount++;
			}

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

		} finally {
			sc.close();
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		try {
			int fiveCount = 0;
			int sevenCount = 0;

			int inputCount = 0;
			while (inputCount < 3) {
				int abc = sc.nextInt();

				if (abc == 5) {
					fiveCount++;
				} else if (abc == 7) {
					sevenCount++;
				}
				inputCount++;
			}

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

		} finally {
			sc.close();
		}
	} main {
		Scanner sc = new Scanner(System.in);
		try {
			int fiveCount = 0;
			int sevenCount = 0;

			int inputCount = 0;
			while (inputCount < 3) {
				int abc = sc.nextInt();

				if (abc == 5) {
					fiveCount++;
				} else if (abc == 7) {
					sevenCount++;
				}
				inputCount++;
			}

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

		} finally {
			sc.close();
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) try {
			int fiveCount = 0;
			int sevenCount = 0;

			int inputCount = 0;
			while (inputCount < 3) {
				int abc = sc.nextInt();

				if (abc == 5) {
					fiveCount++;
				} else if (abc == 7) {
					sevenCount++;
				}
				inputCount++;
			}

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

		} finally {
			sc.close();
		} {
			sc.close();
		} sc.close() sc.close sc {
			int fiveCount = 0;
			int sevenCount = 0;

			int inputCount = 0;
			while (inputCount < 3) {
				int abc = sc.nextInt();

				if (abc == 5) {
					fiveCount++;
				} else if (abc == 7) {
					sevenCount++;
				}
				inputCount++;
			}

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

		} int fiveCount = 0; fiveCount 0 int sevenCount = 0; sevenCount 0 int inputCount = 0; inputCount 0 while (inputCount < 3) {
				int abc = sc.nextInt();

				if (abc == 5) {
					fiveCount++;
				} else if (abc == 7) {
					sevenCount++;
				}
				inputCount++;
			} inputCount < 3 inputCount 3 {
				int abc = sc.nextInt();

				if (abc == 5) {
					fiveCount++;
				} else if (abc == 7) {
					sevenCount++;
				}
				inputCount++;
			} int abc = sc.nextInt(); abc sc.nextInt() sc.nextInt sc if (abc == 5) {
					fiveCount++;
				} else if (abc == 7) {
					sevenCount++;
				} abc == 5 abc 5 {
					fiveCount++;
				} fiveCount++ fiveCount if (abc == 7) {
					sevenCount++;
				} abc == 7 abc 7 {
					sevenCount++;
				} sevenCount++ sevenCount inputCount++ inputCount if (fiveCount == 2 && sevenCount == 1) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			} fiveCount == 2 && sevenCount == 1 fiveCount == 2 fiveCount 2 sevenCount == 1 sevenCount 1 {
				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);
		try {
			int fiveCount = 0;
			int sevenCount = 0;

			int inputCount = 0;
			while (inputCount < 3) {
				int abc = sc.nextInt();

				if (abc == 5) {
					fiveCount++;
				} else if (abc == 7) {
					sevenCount++;
				}
				inputCount++;
			}

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

		} finally {
			sc.close();
		}
	}
} public class Main {

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

			int inputCount = 0;
			while (inputCount < 3) {
				int abc = sc.nextInt();

				if (abc == 5) {
					fiveCount++;
				} else if (abc == 7) {
					sevenCount++;
				}
				inputCount++;
			}

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

		} finally {
			sc.close();
		}
	}
} Main
import java.util.Scanner;

public class Main {

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

			int inputCount = 0;
			while (inputCount < 3) {
				int abc = sc.nextInt();

				if (abc == 5) {
					fiveCount++;
				} else if (abc == 7) {
					sevenCount++;
				}
				inputCount++;
			}

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

		} finally {
			sc.close();
		}
	}
}