#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long sx, sy;
  cin >> n >> sx >> sy;
  int cnt1 = 0, cnt2 = 0, cnt3 = 0, cnt4 = 0, cnt5 = 0, cnt6 = 0, cnt7 = 0,
      cnt8 = 0;
  for (int i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    if (x < sx) {
      if (y > sy)
        cnt1++;
      else if (y < sy)
        cnt2++;
      else
        cnt3++;
    } else if (x > sx) {
      if (y > sy)
        cnt4++;
      else if (y < sy)
        cnt5++;
      else
        cnt6++;
    } else {
      if (y > sy)
        cnt7++;
      else
        cnt8++;
    }
  }
  long long c1 = 0, c2 = 0, c3 = 0, c4 = 0;
  c1 = cnt1 + cnt4 + cnt7;
  c2 = cnt2 + cnt5 + cnt8;
  c3 = cnt1 + cnt2 + cnt3;
  c4 = cnt4 + cnt5 + cnt6;
  long long m = max(c1, max(c2, max(c3, c4)));
  if (m == c1) {
    cout << c1 << endl;
    cout << sx << " " << sy + 1 << endl;
  } else if (m == c2) {
    cout << c2 << endl;
    cout << sx << " " << sy - 1 << endl;
  } else if (m == c3) {
    cout << c3 << endl;
    cout << sx - 1 << " " << sy << endl;
  } else if (m == c4) {
    cout << c4 << endl;
    cout << sx + 1 << " " << sy << endl;
  }
}
