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
#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(NULL);
  int n;
  cin >> n;
  int dir[4]{0};
  long long ax, ay;
  cin >> ax >> ay;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    if (x == ax) {
      if (y < ay)
        dir[2]++;
      else
        dir[0]++;
    } else if (y == ay) {
      if (x < ax)
        dir[1]++;
      else
        dir[3]++;
    } else {
      if (x > ax && y > ay) {
        dir[0]++;
        dir[3]++;
      }
      if (x < ax && y > ay) {
        dir[0]++;
        dir[1]++;
      }
      if (x < ax && y < ay) {
        dir[1]++;
        dir[2]++;
      }
      if (y < ay && x > ax) {
        dir[2]++;
        dir[3]++;
      }
    }
  }
  int max = dir[0];
  int temp = 0;
  for (int i = 1; i < 4; i++) {
    if (max < dir[i]) {
      temp = i;
      max = dir[i];
    }
  }
  cout << max << endl;
  if (temp == 0) {
    ay++;
  }
  if (temp == 1) {
    ax--;
  }
  if (temp == 2) ay--;
  if (temp == 3) ax++;
  cout << ax << " " << ay;
}
