1 1000000000 7
1000000000 9
 3 2 2
2 4
2 1
3 6
 2 1000000000 100000
1000000000 1000000
1000000000 10000
 1 100 100
50 70
 1 100 100
101 100

1
1000000000 8 2
2 3 1
1000000000 100001 1
99 100 1
101 100


import java.util.*;
import java.io.*;
import static java.lang.Math.*;

public class Main implements Runnable
{
    boolean multiple = false;

    void solve() throws Exception
    {
        int n = sc.nextInt();
        int sx = sc.nextInt();
        int sy = sc.nextInt();
        int u = 0, l = 0, d = 0, r = 0;
        int ul = 0, ur = 0, dl = 0, dr = 0;
        for (int i = 0; i < n; i++)
        {
            int x = sc.nextInt() - sx;
            int y = sc.nextInt() - sy;

            if (y > 0) u++;
            if (x < 0) l++;
            if (y < 0) d++;
            if (x > 0) r++;
            if (y > 0 && x < 0) ul++;
            if (y > 0 && x > 0) ur++;
            if (y < 0 && x < 0) dl++;
            if (y < 0 && x > 0) ur++;
        }

        int max = max(max(max(u, l), max(d, r)), max(max(ul, ur), max(dl, dr)));
        System.out.println(max);
        if (u == max) System.out.println(sx + " " + (sy + 1));
        else if (l == max) System.out.println((sx - 1) + " " + sy);
        else if (d == max) System.out.println(sx + " " + (sy - 1));
        else if (r == max) System.out.println((sx + 1) + " " + sy);
        else if (ul == max) System.out.println((sx - 1) + " " + (sy + 1));
        else if (ur == max) System.out.println((sx + 1) + " " + (sy + 1));
        else if (dl == max) System.out.println((sx - 1) + " " + (sy - 1));
        else if (dr == max) System.out.println((sx + 1) + " " + (sy - 1));
    }

    @Override
    public void run()
    {
        try
        {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
            sc = new FastScanner(in);
            if (multiple)
            {
                int q = sc.nextInt();
                for (int i = 0; i < q; i++)
                    solve();
            }
            else
                solve();
        }
        catch (Throwable uncaught)
        {
            Main.uncaught = uncaught;
        }
        finally
        {
            out.close();
        }
    }

    public static void main(String[] args) throws Throwable
    {
        Thread thread = new Thread(null, new Main(), "", (1 << 26));
        thread.start();
        thread.join();
        if (Main.uncaught != null) {
            throw Main.uncaught;
        }
    }

    static Throwable uncaught; BufferedReader in; FastScanner sc; PrintWriter out;
}

class FastScanner
{
    BufferedReader in;
    StringTokenizer st;

    public FastScanner(BufferedReader in)
    {
        this.in = in;
    }

    public String nextToken() throws Exception {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }

    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}