1
2 2
1 1
1 2
 1
1 3
3
1 2 3
 1
1 1
1000
1000
 1
2 2
2 2
2 2
 5
4 5
10 8 6 4
1 2 3 4 5
1 1
3
3
1 1
3
2
5 3
1000 2 2 2 3
3 1 5
5 5
1 2 3 4 5
1 2 3 4 5
 1
4 4
1 1 1 1
1 2 3 4
 1
2 3
1 1
1 2 3

YES
1 1
 YES
1 3
 YES
1 1000
 YES
1 2
 YES
1 4
YES
1 3
NO
YES
1 3
YES
1 1
 YES
1 1
 YES
1 1

import java.util.*;
import java.io.*;

public class P1382A {
    // Global Variables
    public static final boolean ENV = false;
    public static final String pathToInputFile = "src/in/P1382A.txt";

    // in and out Variables
    public static final PrintWriter out = new PrintWriter(System.out, true);
    public static final FastReader in;

    static {
        FastReader inTemp;
        try {
            inTemp = !ENV ? new FastReader() :
                    new FastReader(new File(pathToInputFile));
        } catch (FileNotFoundException e) {
            inTemp = new FastReader();
        }
        in = inTemp;
    }

    // FastReader Class
    public static class FastReader extends BufferedReader {
        StringTokenizer st;

        public FastReader() {
            super(new InputStreamReader(System.in));
        }

        public FastReader(File file) throws FileNotFoundException {
            super(new InputStreamReader(new FileInputStream(file)));
        }

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

        public String[] next(int t) {
            String[] r = new String[t];
            for (int i = 0; i < t; i++) {
                r[i] = next();
            }
            return r;
        }

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

        public int[] nextInt(int t) {
            int[] r = new int[t];
            for (int i = 0; i < t; i++) {
                r[i] = Integer.parseInt(next());
            }
            return r;
        }

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

        public long[] nextLong(int t) {
            long[] r = new long[t];
            for (int i = 0; i < t; i++) {
                r[i] = Long.parseLong(next());
            }
            return r;
        }

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

        public double[] nextDouble(int t) {
            double[] r = new double[t];
            for (int i = 0; i < t; i++) {
                r[i] = Double.parseDouble(next());
            }
            return r;
        }
    }

    // Custom Functions

    // Main
    public static void main(String[] args) {
        System.out.println("test");
    }
}