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 java.math.BigInteger;

public class Main implements Runnable {
  static Scanner in;
  // static FastReader in;
  static PrintWriter out;
  static int[][] dirs8 = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}, {1, 1}, {-1, -1}, {-1, 1}, {1, -1}};
  static int[][] dirs = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};

  static int[][] E;
  // static List<int[]>[] adj;
  static List<Integer>[] adj;
  static Map<String, Integer> map;
  static int[] vis;

  static long INFL = (long) 1e15 + 7;
  static int INF = (int) 1e7 + 9;

  static int T, n, m, k, count;
  static boolean flag;
  static int[] a;
  static int[][] dp;

  static void solve() {
    n = in.nextInt();
    a = new int[4];
    int sx = in.nextInt();
    int sy = in.nextInt();
    for (int i = 0; i < n; i++) {
      int x = in.nextInt();
      int y = in.nextInt();

      if (y >= sy + 1) {a[0]++;}
      if (y <= sy - 1) {a[2]++;}
      if (x >= sx + 1) {a[3]++;}
      if (x <= sx - 1) {a[1]++;}
    }

    int id = 0;
    int max = a[id];

    for (int i = 1; i < 4; i++) {
      if (a[i] > a[id]) {id = i; max = a[id];}
    }

    out.println(max);
    switch (id) {
      case 0: 
        out.println(sx + " " + (sy + 1));
        break;
      case 1: 
        out.println((sx - 1) + " " + sy);
        break;
      case 2: 
        out.println(sx + " " + (sy - 1));
        break;
      case 3: 
        out.println((sx + 1) + " " + sy);
        break;
    }



  }


  static class Node {
    Node left, right, par;
    int val, idx; 
    int size = 1;
    Node() {}
    Node(int i, int c) {idx = i; val = c;}
  }


 
  

  public static void main(String[] args) throws Exception{

    in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
    // in = new FastReader();
    out = new PrintWriter(System.out);

    // int T = in.nextInt();
    // for (int tt = 1; tt <= T; tt++) {
    //   Thread t = new Thread(null, new Main(), "Main", 1 << 28);
    //   t.start();
    //   t.join();
    //   // solve();
    // }

    // Thread t = new Thread(null, new Main(), "Main", 1 << 28);
    // t.start();
    // t.join();
    solve();

    out.flush();
    out.close();
  }




  @Override
  public void run() {solve();}

  static class FastReader {
    public BufferedReader br; 
    StringTokenizer st; 
    public FastReader() {br = new BufferedReader(new InputStreamReader(System.in));} 
    String next() { 
      while (st == null || !st.hasMoreElements()) { 
          try {st = new StringTokenizer(br.readLine());} 
          catch (IOException e) {e.printStackTrace();} 
      } 
      return st.nextToken(); 
    } 
    int nextInt() {return Integer.parseInt(next());} 
    long nextLong() {return Long.parseLong(next());} 
    double nextDouble() {return Double.parseDouble(next());} 
    String nextLine() {
      String str = ""; 
        try {str = br.readLine();} 
        catch (IOException e) {e.printStackTrace();} 
        return str; 
    }
  }
} 
