#include <bits/stdc++.h>
using namespace std;
const int mxn = 2e5 + 5;
int fx[] = {-1, 1, 0, 0};
int fy[] = {0, 0, 1, -1};
bool check(pair<long long, long long> a, pair<long long, long long> b,
           pair<long long, long long> c) {
  if (min(a.first, b.first) <= c.first && max(a.first, b.first) >= c.first &&
      min(a.second, b.second) <= c.second &&
      max(a.second, b.second) >= c.second) {
    return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  int T = 1;
  while (T--) {
    long long n, x, y;
    cin >> n >> x >> y;
    long long cnt1 = 0, cnt2 = 0, cnt3 = 0, cnt4 = 0;
    for (int i = 0; i < n; i++) {
      long long a, b;
      cin >> a >> b;
      if (check(make_pair(x, y), make_pair(a, b), make_pair(x - 1, y))) cnt1++;
      if (check(make_pair(x, y), make_pair(a, b), make_pair(x + 1, y))) cnt2++;
      if (check(make_pair(x, y), make_pair(a, b), make_pair(x, y + 1))) cnt3++;
      if (check(make_pair(x, y), make_pair(a, b), make_pair(x, y - 1))) cnt4++;
    }
    vector<pair<long long, long long> > v;
    v.push_back({cnt1, 0});
    v.push_back({cnt2, 1});
    v.push_back({cnt3, 2});
    v.push_back({cnt4, 3});
    sort(v.begin(), v.end());
    cout << v.back().first << '\n';
    cout << x + fx[v.back().second] << ' ' << y + fy[v.back().second] << '\n';
  }
  return 0;
}
