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;
const int mxn = 200005;
pair<int, int> arr[mxn];
int n, sx, sy;
int ans, ax, ay;
int tmp;
bool ok(int i, int a, int b) {
  if (a > sx) {
    return (arr[i].first > sx);
  } else if (a < sx) {
    return (arr[i].first < sx);
  } else if (b > sy) {
    return (arr[i].second > sy);
  } else if (b < sy) {
    return (arr[i].second < sy);
  }
}
void go(int a, int b) {
  if (a < 0 || b < 0 || a > 1e9 || b > 1e9) return;
  int count = 0;
  for (int i = 0; i < n; i++) {
    if (ok(i, a, b)) count++;
  }
  if (ans < count) {
    ans = count;
    ax = a;
    ay = b;
  }
}
void solve() {
  ans = ax = ay = 0;
  go(sx + 1, sy);
  go(sx - 1, sy);
  go(sx, sy - 1);
  go(sx, sy + 1);
  cout << ans << '\n' << ax << " " << ay << '\n';
}
void read() {
  cin >> n >> sx >> sy;
  for (int i = 0; i < n; i++) {
    cin >> arr[i].first >> arr[i].second;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  int T = 1;
  while (T--) read(), solve();
  return 0;
}
