import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
	private static final FastIn in = new FastIn();
	private static final PrintWriter out = new PrintWriter(System.out);

	public static void main(String[] args) {
		Solver sol = new Solver();
		sol.solve();
		out.close();
	}

	private static final class Solver {
		public void solve() {
			int[] a = new int[3];
			for (int i = 0; i < 3; ++i) a[i] = in.nextInt();
			int f = 0, s = 0;
			for (int i = 0; i < 3; ++i) if (a[i] % 5 == 0) f++; else if (a[i] % 7 == 0) s++;
			if (f == 2 && s == 1) out.println("YES");
			else out.println("NO");
		}
	}

	private static final class FastIn {
		private BufferedReader br;
		private StringTokenizer st;

		public FastIn() {
			br = new BufferedReader(new InputStreamReader(System.in), 1 << 20);
			st = null;
		}

		public String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintWriter; PrintWriter java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {
	private static final FastIn in = new FastIn();
	private static final PrintWriter out = new PrintWriter(System.out);

	public static void main(String[] args) {
		Solver sol = new Solver();
		sol.solve();
		out.close();
	}

	private static final class Solver {
		public void solve() {
			int[] a = new int[3];
			for (int i = 0; i < 3; ++i) a[i] = in.nextInt();
			int f = 0, s = 0;
			for (int i = 0; i < 3; ++i) if (a[i] % 5 == 0) f++; else if (a[i] % 7 == 0) s++;
			if (f == 2 && s == 1) out.println("YES");
			else out.println("NO");
		}
	}

	private static final class FastIn {
		private BufferedReader br;
		private StringTokenizer st;

		public FastIn() {
			br = new BufferedReader(new InputStreamReader(System.in), 1 << 20);
			st = null;
		}

		public String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}
	}
} Main private static final FastIn in = new FastIn(); in new FastIn() private static final PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) public static void main(String[] args) {
		Solver sol = new Solver();
		sol.solve();
		out.close();
	} main {
		Solver sol = new Solver();
		sol.solve();
		out.close();
	} Solver sol = new Solver(); sol new Solver() sol.solve() sol.solve sol out.close() out.close out String[] args args private static final class Solver {
		public void solve() {
			int[] a = new int[3];
			for (int i = 0; i < 3; ++i) a[i] = in.nextInt();
			int f = 0, s = 0;
			for (int i = 0; i < 3; ++i) if (a[i] % 5 == 0) f++; else if (a[i] % 7 == 0) s++;
			if (f == 2 && s == 1) out.println("YES");
			else out.println("NO");
		}
	} Solver public void solve() {
			int[] a = new int[3];
			for (int i = 0; i < 3; ++i) a[i] = in.nextInt();
			int f = 0, s = 0;
			for (int i = 0; i < 3; ++i) if (a[i] % 5 == 0) f++; else if (a[i] % 7 == 0) s++;
			if (f == 2 && s == 1) out.println("YES");
			else out.println("NO");
		} solve {
			int[] a = new int[3];
			for (int i = 0; i < 3; ++i) a[i] = in.nextInt();
			int f = 0, s = 0;
			for (int i = 0; i < 3; ++i) if (a[i] % 5 == 0) f++; else if (a[i] % 7 == 0) s++;
			if (f == 2 && s == 1) out.println("YES");
			else out.println("NO");
		} int[] a = new int[3]; a new int[3] 3 for (int i = 0; i < 3; ++i) a[i] = in.nextInt(); int i = 0; int i = 0; i 0 i < 3 i 3 ++i ++i i a[i] = in.nextInt(); a[i] = in.nextInt() a[i] a i in.nextInt() in.nextInt in int f = 0 f 0 s = 0; s 0 for (int i = 0; i < 3; ++i) if (a[i] % 5 == 0) f++; else if (a[i] % 7 == 0) s++; int i = 0; int i = 0; i 0 i < 3 i 3 ++i ++i i if (a[i] % 5 == 0) f++; else if (a[i] % 7 == 0) s++; if (a[i] % 5 == 0) f++; else if (a[i] % 7 == 0) s++; a[i] % 5 == 0 a[i] % 5 a[i] a i 5 0 f++ f if (a[i] % 7 == 0) s++; a[i] % 7 == 0 a[i] % 7 a[i] a i 7 0 s++ s if (f == 2 && s == 1) out.println("YES");
			else out.println("NO"); f == 2 && s == 1 f == 2 f 2 s == 1 s 1 out.println("YES") out.println out "YES" out.println("NO") out.println out "NO" private static final class FastIn {
		private BufferedReader br;
		private StringTokenizer st;

		public FastIn() {
			br = new BufferedReader(new InputStreamReader(System.in), 1 << 20);
			st = null;
		}

		public String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}
	} FastIn private BufferedReader br; br private StringTokenizer st; st public FastIn() {
			br = new BufferedReader(new InputStreamReader(System.in), 1 << 20);
			st = null;
		} FastIn {
			br = new BufferedReader(new InputStreamReader(System.in), 1 << 20);
			st = null;
		} br = new BufferedReader(new InputStreamReader(System.in), 1 << 20) br new BufferedReader(new InputStreamReader(System.in), 1 << 20) st = null st null public String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return st.nextToken();
		} next {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return st.nextToken();
		} while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			} st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			} try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				} catch (IOException e) {
					throw new RuntimeException(e);
				} IOException e {
					throw new RuntimeException(e);
				} throw new RuntimeException(e); new RuntimeException(e) {
					st = new StringTokenizer(br.readLine());
				} st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public int nextInt() {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public class Main {
	private static final FastIn in = new FastIn();
	private static final PrintWriter out = new PrintWriter(System.out);

	public static void main(String[] args) {
		Solver sol = new Solver();
		sol.solve();
		out.close();
	}

	private static final class Solver {
		public void solve() {
			int[] a = new int[3];
			for (int i = 0; i < 3; ++i) a[i] = in.nextInt();
			int f = 0, s = 0;
			for (int i = 0; i < 3; ++i) if (a[i] % 5 == 0) f++; else if (a[i] % 7 == 0) s++;
			if (f == 2 && s == 1) out.println("YES");
			else out.println("NO");
		}
	}

	private static final class FastIn {
		private BufferedReader br;
		private StringTokenizer st;

		public FastIn() {
			br = new BufferedReader(new InputStreamReader(System.in), 1 << 20);
			st = null;
		}

		public String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}
	}
} public class Main {
	private static final FastIn in = new FastIn();
	private static final PrintWriter out = new PrintWriter(System.out);

	public static void main(String[] args) {
		Solver sol = new Solver();
		sol.solve();
		out.close();
	}

	private static final class Solver {
		public void solve() {
			int[] a = new int[3];
			for (int i = 0; i < 3; ++i) a[i] = in.nextInt();
			int f = 0, s = 0;
			for (int i = 0; i < 3; ++i) if (a[i] % 5 == 0) f++; else if (a[i] % 7 == 0) s++;
			if (f == 2 && s == 1) out.println("YES");
			else out.println("NO");
		}
	}

	private static final class FastIn {
		private BufferedReader br;
		private StringTokenizer st;

		public FastIn() {
			br = new BufferedReader(new InputStreamReader(System.in), 1 << 20);
			st = null;
		}

		public String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
	private static final FastIn in = new FastIn();
	private static final PrintWriter out = new PrintWriter(System.out);

	public static void main(String[] args) {
		Solver sol = new Solver();
		sol.solve();
		out.close();
	}

	private static final class Solver {
		public void solve() {
			int[] a = new int[3];
			for (int i = 0; i < 3; ++i) a[i] = in.nextInt();
			int f = 0, s = 0;
			for (int i = 0; i < 3; ++i) if (a[i] % 5 == 0) f++; else if (a[i] % 7 == 0) s++;
			if (f == 2 && s == 1) out.println("YES");
			else out.println("NO");
		}
	}

	private static final class FastIn {
		private BufferedReader br;
		private StringTokenizer st;

		public FastIn() {
			br = new BufferedReader(new InputStreamReader(System.in), 1 << 20);
			st = null;
		}

		public String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}
	}
}
