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

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    int sx = Integer.parseInt(sc.next());
    int sy = Integer.parseInt(sc.next());
    int[] x = new int[n];
    int[] y = new int[n];
    for(int i = 0; i < n; i++) {
      x[i] = Integer.parseInt(sc.next());
      y[i] = Integer.parseInt(sc.next());
    }
    int count;
    int[] dx = {0, 1, 0, -1};
    int[] dy = {-1, 0, 1, 0};
    int tempx, tempy;
    int a, b, c;
    int anscount = 0, ansx = sx, ansy = sy;
    for(int i = 0; i < 4; i++) {
      count = 0;
      tempx = sx + dx[i];
      tempy = sy + dy[i];
      for(int j = 0; j < n; j++) {
        if(x[j] < sx) {
          a = x[j];
          b = sx;
        } else {
          a = sx;
          b = x[j];
        }
        if(!(a <= tempx && tempx <= b)) continue;
        if(y[j] < sy) {
          a = y[j];
          b = sy;
        } else {
          a = sy;
          b = y[j];
        }
        if(!(a <= tempy && tempy <= b)) continue;
        count++;
      }
      if(anscount < count) {
        anscount = count;
        ansx = tempx;
        ansy = tempy;
      }
    }
    System.out.println(anscount);
    System.out.println(ansx + " " + ansy);
  }
}
