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() {
  long long int n, sx, sy;
  cin >> n >> sx >> sy;
  long long int x[200010], y[200010];
  for (long long int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  long long int xcntg = 0, xcntl = 0;
  long long int ycntg = 0, ycntl = 0;
  for (long long int i = 0; i < n; i++) {
    if (x[i] > sx) {
      xcntg++;
    } else if (x[i] < sx) {
      xcntl++;
    }
  }
  for (long long int i = 0; i < n; i++) {
    if (y[i] > sy) {
      ycntg++;
    } else if (y[i] < sy) {
      ycntl++;
    }
  }
  long long int ans1 = max(xcntg, xcntl);
  long long int ans2 = max(ycntl, ycntg);
  long long int ans = max(ans1, ans2);
  cout << ans << endl;
  if (ans == ans1) {
    if (ans1 == xcntg) {
      cout << sx + 1 << " " << sy << endl;
    } else {
      cout << sx - 1 << " " << sy << endl;
    }
  } else {
    if (ans2 == ycntg) {
      cout << sx << " " << sy + 1 << endl;
    } else {
      cout << sx << " " << sy - 1 << endl;
    }
  }
  return 0;
}
