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;
unsigned long long min(unsigned long long x, unsigned long long y) {
  if (x < y) return x;
  return y;
}
unsigned long long max(unsigned long long x, unsigned long long y) {
  if (x < y) return y;
  return x;
}
long long min(long long x, long long y) {
  if (x < y) return x;
  return y;
}
long long max(long long x, long long y) {
  if (x < y) return y;
  return x;
}
double min(double x, double y) {
  if (x < y) return x;
  return y;
}
double max(double x, double y) {
  if (x < y) return y;
  return x;
}
unsigned long long gcd(unsigned long long x, unsigned long long y) {
  if (!x) return y;
  if (!y) return x;
  if (x > y) swap(x, y);
  return gcd(x, y % x);
}
unsigned long long inv(unsigned long long a, unsigned long long c) {
  if (a == 1) {
    return 1;
  }
  return ((c - (c / a)) * inv(c % a, c)) % c;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, sx, sy;
  cin >> n >> sx >> sy;
  vector<int> x(n, 0), y(n, 0);
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  int nx[4] = {1, -1, 0, 0}, ny[4] = {0, 0, 1, -1};
  int ans = -1, X, Y;
  for (int k = 0; k < 4; k++) {
    int SX = sx + nx[k], SY = sy + ny[k];
    if ((SX >= 0) && (SX <= 1e9) && (SY >= 0) && (SY <= 1e9)) {
      int cnt = 0;
      for (int i = 0; i < n; i++) {
        int dist = abs(x[i] - sx) + abs(y[i] - sy),
            d = abs(x[i] - SX) + abs(y[i] - SY);
        if (dist == d + 1) {
          cnt++;
        }
      }
      if (cnt > ans) {
        ans = cnt;
        X = SX;
        Y = SY;
      }
    }
  }
  cout << ans << "\n" << X << " " << Y << "\n";
  return 0;
}
