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 MAX = 2e5 + 6;
const long long MOD = 1e9 + 7;
int x[MAX], y[MAX];
vector<pair<int, int> > v[5];
pair<int, int> ara[5];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, sx, sy;
  cin >> n >> sx >> sy;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
    x[i] -= sx, y[i] -= sy;
  }
  for (int i = 0; i < n; i++) {
    if (x[i] > 0) {
      v[1].push_back({x[i], y[i]});
    } else {
      v[2].push_back({x[i], y[i]});
    }
  }
  for (int i = 0; i < n; i++) {
    if (y[i] > 0) {
      v[3].push_back({x[i], y[i]});
    } else {
      v[4].push_back({x[i], y[i]});
    }
  }
  ara[1] = {1, 0};
  ara[2] = {-1, 0};
  ara[3] = {0, 1};
  ara[4] = {0, -1};
  int mx = 0;
  pair<int, int> ans;
  for (int i = 1; i <= 4; i++) {
    if ((int)v[i].size() > mx) {
      ans = ara[i];
      mx = v[i].size();
    }
  }
  cout << mx << "\n";
  if (mx) cout << ans.first + sx << " " << ans.second + sy;
}
