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 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;
}
