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 long long int mod = 1000000000 + 7;
const long long int N = 10000000 + 6;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t, sx, sy;
  cin >> t >> sx >> sy;
  int r = 0, u = 0, l = 0, d = 0;
  int x, y;
  while (t--) {
    cin >> x >> y;
    if (x == sx) {
      if (sy > y)
        d++;
      else
        u++;
    } else if (y == sy) {
      if (sx > x)
        l++;
      else
        r++;
    } else {
      if (sx > x)
        l++;
      else
        r++;
      if (sy > y)
        d++;
      else
        u++;
    }
  }
  int ansx, ansy;
  if (d > u)
    ansy = sy - 1;
  else
    ansy = sy + 1;
  if (l > r)
    ansx = sx - 1;
  else
    ansx = sx + 1;
  int maxm = max(max(l, r), max(u, d));
  cout << maxm << endl;
  cout << ansx << " " << ansy;
}
