import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		List<String> ss = new ArrayList<String>();

		try {
			ss.add(sc.next());
			ss.add(sc.next());
			ss.add(sc.next());
			Collections.sort(ss);

			for (int i = 0; i < 3; i++) {
				if ((i == 0 || i == 1) && !"5".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				} else if (i == 3 && !"7".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				}
			}
			System.out.println("YES");
		} catch (Exception e) {

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

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		List<String> ss = new ArrayList<String>();

		try {
			ss.add(sc.next());
			ss.add(sc.next());
			ss.add(sc.next());
			Collections.sort(ss);

			for (int i = 0; i < 3; i++) {
				if ((i == 0 || i == 1) && !"5".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				} else if (i == 3 && !"7".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				}
			}
			System.out.println("YES");
		} catch (Exception e) {

		} finally {
			sc.close();
		}
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		List<String> ss = new ArrayList<String>();

		try {
			ss.add(sc.next());
			ss.add(sc.next());
			ss.add(sc.next());
			Collections.sort(ss);

			for (int i = 0; i < 3; i++) {
				if ((i == 0 || i == 1) && !"5".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				} else if (i == 3 && !"7".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				}
			}
			System.out.println("YES");
		} catch (Exception e) {

		} finally {
			sc.close();
		}
	} main {
		Scanner sc = new Scanner(System.in);
		List<String> ss = new ArrayList<String>();

		try {
			ss.add(sc.next());
			ss.add(sc.next());
			ss.add(sc.next());
			Collections.sort(ss);

			for (int i = 0; i < 3; i++) {
				if ((i == 0 || i == 1) && !"5".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				} else if (i == 3 && !"7".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				}
			}
			System.out.println("YES");
		} catch (Exception e) {

		} finally {
			sc.close();
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) List<String> ss = new ArrayList<String>(); ss new ArrayList<String>() try {
			ss.add(sc.next());
			ss.add(sc.next());
			ss.add(sc.next());
			Collections.sort(ss);

			for (int i = 0; i < 3; i++) {
				if ((i == 0 || i == 1) && !"5".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				} else if (i == 3 && !"7".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				}
			}
			System.out.println("YES");
		} catch (Exception e) {

		} finally {
			sc.close();
		} catch (Exception e) {

		} Exception e {

		} {
			sc.close();
		} sc.close() sc.close sc {
			ss.add(sc.next());
			ss.add(sc.next());
			ss.add(sc.next());
			Collections.sort(ss);

			for (int i = 0; i < 3; i++) {
				if ((i == 0 || i == 1) && !"5".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				} else if (i == 3 && !"7".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				}
			}
			System.out.println("YES");
		} ss.add(sc.next()) ss.add ss sc.next() sc.next sc ss.add(sc.next()) ss.add ss sc.next() sc.next sc ss.add(sc.next()) ss.add ss sc.next() sc.next sc Collections.sort(ss) Collections.sort Collections ss for (int i = 0; i < 3; i++) {
				if ((i == 0 || i == 1) && !"5".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				} else if (i == 3 && !"7".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				}
			} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
				if ((i == 0 || i == 1) && !"5".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				} else if (i == 3 && !"7".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				}
			} {
				if ((i == 0 || i == 1) && !"5".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				} else if (i == 3 && !"7".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				}
			} if ((i == 0 || i == 1) && !"5".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				} else if (i == 3 && !"7".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				} (i == 0 || i == 1) && !"5".equals(ss.get(i)) (i == 0 || i == 1) i == 0 i 0 i == 1 i 1 !"5".equals(ss.get(i)) "5".equals(ss.get(i)) "5".equals "5" ss.get(i) ss.get ss i {
					System.out.println("NO");
					throw new Exception();
				} System.out.println("NO") System.out.println System.out System System.out "NO" throw new Exception(); new Exception() if (i == 3 && !"7".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				} i == 3 && !"7".equals(ss.get(i)) i == 3 i 3 !"7".equals(ss.get(i)) "7".equals(ss.get(i)) "7".equals "7" ss.get(i) ss.get ss i {
					System.out.println("NO");
					throw new Exception();
				} System.out.println("NO") System.out.println System.out System System.out "NO" throw new Exception(); new Exception() System.out.println("YES") System.out.println System.out System System.out "YES" String args[] args public class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		List<String> ss = new ArrayList<String>();

		try {
			ss.add(sc.next());
			ss.add(sc.next());
			ss.add(sc.next());
			Collections.sort(ss);

			for (int i = 0; i < 3; i++) {
				if ((i == 0 || i == 1) && !"5".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				} else if (i == 3 && !"7".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				}
			}
			System.out.println("YES");
		} catch (Exception e) {

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

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		List<String> ss = new ArrayList<String>();

		try {
			ss.add(sc.next());
			ss.add(sc.next());
			ss.add(sc.next());
			Collections.sort(ss);

			for (int i = 0; i < 3; i++) {
				if ((i == 0 || i == 1) && !"5".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				} else if (i == 3 && !"7".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				}
			}
			System.out.println("YES");
		} catch (Exception e) {

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

public class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		List<String> ss = new ArrayList<String>();

		try {
			ss.add(sc.next());
			ss.add(sc.next());
			ss.add(sc.next());
			Collections.sort(ss);

			for (int i = 0; i < 3; i++) {
				if ((i == 0 || i == 1) && !"5".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				} else if (i == 3 && !"7".equals(ss.get(i))) {
					System.out.println("NO");
					throw new Exception();
				}
			}
			System.out.println("YES");
		} catch (Exception e) {

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