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 n, sx, sy;
vector<pair<int, int>> p;
long long ans = 0;
int ansx, ansy;
void find(int x, int y) {
  long long c = 0;
  for (int i = 0; i < n; ++i) {
    long long minc = abs(sx - p[i].first) + abs(sy - p[i].second);
    long long shoarma = 1 + abs(x - p[i].first) + abs(y - p[i].second);
    if (minc == shoarma) ++c;
  }
  if (c > ans) {
    ans = c;
    ansx = x;
    ansy = y;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> sx >> sy;
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    p.push_back(make_pair(x, y));
  }
  find(sx - 1, sy);
  find(sx, sy - 1);
  find(sx + 1, sy);
  find(sx, sy + 1);
  cout << ans << endl;
  cout << ansx << " " << ansy << endl;
  return 0;
}
