#include <bits/stdc++.h>
using namespace std;
const int mod = int(1e9) + 7;
const int MAXSIZE = int(1e5) + 5;
const int MAX = 15000000;
string s1, s2, s3;
long long x, y, z, ca, cnt, ans;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long T = 1;
  while (T--) {
    long long n, sx, sy;
    cin >> n >> sx >> sy;
    vector<long long> x(n);
    vector<long long> y(n);
    for (long long i = 0; i < n; ++i) {
      cin >> x[i];
      cin >> y[i];
    }
    long long cnt1 = 0, cnt2 = 0, cnt3 = 0, cnt4 = 0;
    for (long long i = 0; i < n; ++i) {
      if (x[i] > sx) cnt1++;
      if (x[i] < sx) cnt2++;
      if (y[i] > sy) cnt3++;
      if (y[i] < sy) cnt4++;
    }
    long long mx = max({cnt1, cnt2, cnt3, cnt4});
    cout << mx << endl;
    if (cnt1 == mx) {
      sx++;
    } else if (cnt2 == mx) {
      sx--;
    } else if (cnt3 == mx) {
      sy++;
    } else {
      sy--;
    }
    cout << sx << " " << sy << endl;
  }
  return 0;
}
