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.Scanner;


public class ShwarTent {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    long sx = sc.nextLong();
    long sy = sc.nextLong();
    int up = 0;
    int dn = 0;
    int lf = 0;
    int rt = 0;
    for(int i = 0; i < n; i++) {
      long x = sc.nextLong();
      long y = sc.nextLong();
      if(x>sx) rt++;
      else if(x<sx) lf++;
      if(y>sy) up++;
      else if(y<sy) dn++;
    }
    int[] arr = {rt,lf,dn,up};
    int max = -1;
    int ind = -1;
    for(int i = 0; i < 4; i++) {
      if(arr[i]>max) {
        max = arr[i];
        ind = i;
      }
    }
    switch(ind) {
      case 0:
      System.out.println(rt);
      System.out.println(sx+1 + " " + sy);
      break;
      case 1:
      System.out.println(lf);
      System.out.println(sx-1 + " " + sy);
      break;
      case 2:
      System.out.println(dn);
      System.out.println(sx + " " + (sy-1));
      break;
      case 3:
      System.out.println(up);
      System.out.println(sx + " " + (sy+1));
      break;
    }
  }

}
