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;
long long ans = -1, xg = -1, yg = -1;
long long n, sx, sy;
void func(vector<pair<long long, long long>> vv, long long x, long long y) {
  long long aks = 0;
  for (auto pp : vv) {
    if ((pp.first >= x && x > sx) && (y == sy)) {
      aks += 1;
    } else if ((pp.first >= x && x > sx) && (pp.second >= y && y > sy)) {
      aks += 1;
    } else if ((x == sx) && (pp.second >= y && y > sy)) {
      aks += 1;
    } else if ((pp.first <= x && x < sx) && (pp.second <= y && y < sy)) {
      aks += 1;
    } else if ((pp.first >= x && x > sx) && (pp.second <= y && y < sy)) {
      aks += 1;
    } else if ((pp.first <= x && x < sx) && (pp.second >= y && y > sy)) {
      aks += 1;
    } else if ((pp.first <= x && x < sx) && (y == sy)) {
      aks += 1;
    } else if ((x == sx) && (pp.second <= y && y < sy)) {
      aks += 1;
    }
  }
  if (aks >= ans) {
    ans = aks;
    xg = x;
    yg = y;
  }
}
int main() {
  cin >> n >> sx >> sy;
  vector<pair<long long, long long>> vv;
  for (int i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    vv.push_back(make_pair(x, y));
  }
  func(vv, sx + 1, sy);
  func(vv, sx + 1, sy + 1);
  func(vv, sx, sy + 1);
  func(vv, sx - 1, sy - 1);
  func(vv, sx + 1, sy - 1);
  func(vv, sx - 1, sy + 1);
  func(vv, sx - 1, sy);
  func(vv, sx, sy - 1);
  cout << ans << endl << xg << " " << yg;
  return 0;
}
