Toad Ivan has m pairs of integers, each integer is between 1 and n, inclusive. The pairs are (a_1, b_1), (a_2, b_2), …, (a_m, b_m). 

He asks you to check if there exist two integers x and y (1 ≤ x < y ≤ n) such that in each given pair at least one integer is equal to x or y.

Input

The first line contains two space-separated integers n and m (2 ≤ n ≤ 300 000, 1 ≤ m ≤ 300 000) — the upper bound on the values of integers in the pairs, and the number of given pairs.

The next m lines contain two integers each, the i-th of them contains two space-separated integers a_i and b_i (1 ≤ a_i, b_i ≤ n, a_i ≠ b_i) — the integers in the i-th pair.

Output

Output "YES" if there exist two integers x and y (1 ≤ x < y ≤ n) such that in each given pair at least one integer is equal to x or y. Otherwise, print "NO". You can print each letter in any case (upper or lower).

Examples

Input


4 6
1 2
1 3
1 4
2 3
2 4
3 4


Output


NO


Input


5 4
1 2
2 3
3 4
4 5


Output


YES


Input


300000 5
1 2
1 2
1 2
1 2
1 2


Output


YES

Note

In the first example, you can't choose any x, y because for each such pair you can find a given pair where both numbers are different from chosen integers.

In the second example, you can choose x=2 and y=4.

In the third example, you can choose x=1 and y=2.
import java.io.IOException;
import java.io.InputStream;
import java.util.InputMismatchException;

public class b1169 {

	public static void main(String[] args) {
		FastScanner in = new FastScanner(System.in);
		int N = in.nextInt();
		int M = in.nextInt();

		Pair[] ps = new Pair[M];
		for (int i = 0; i < M; i++) {
			ps[i] = new Pair(in.nextInt(), in.nextInt());
		}

		int x = ps[0].a;
		int[] freq = new int[N + 1];
		int numX = 0;
		int maxX = 0;
		for (int i = 0; i < M; i++) {
			if (ps[i].a != x && ps[i].b != x) {
				freq[ps[i].a]++;
				freq[ps[i].b]++;
				maxX = Math.max(maxX, Math.max(freq[ps[i].a], freq[ps[i].b]));
			} else {
				numX++;
			}
		}

		if (maxX + numX == M)
			System.out.println("YES");
		else {
			x = ps[0].b;
			freq = new int[N + 1];
			numX = 0;
			maxX = 0;
			for (int i = 0; i < M; i++) {
				if (ps[i].a != x && ps[i].b != x) {
					freq[ps[i].a]++;
					freq[ps[i].b]++;
					maxX = Math.max(maxX, Math.max(freq[ps[i].a], freq[ps[i].b]));
				} else {
					numX++;
				}
			}

			if (maxX + numX == M)
				System.out.println("YES");
			else
				System.out.println("NO");
		}

	}

	static class Pair implements Comparable<Pair> {
		int a;
		int b;

		public Pair(int x, int y) {
			a = x;
			b = y;
		}

		public int compareTo(Pair p) {
			if (a == p.a)
				return Integer.compare(b, p.b);

			return Integer.compare(a, p.a);
		}

		public String toString() {
			return "[" + a + " " + b + "]";
		}
	}

	// Matt Fontaine's Fast I/O
	static class FastScanner {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public FastScanner(InputStream stream) {
			this.stream = stream;
		}

		int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		boolean isEndline(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

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

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String next() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		String nextLine() {
			int c = read();
			while (isEndline(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndline(c));
			return res.toString();
		}
	}
}
