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 inf = 2e9;
const long long INF = 8e18;
const int maxn = 2e5 + 5;
pair<int, int> a[maxn];
int ans = 0, x = 0, y = 0;
int n, sx, sy;
int cnt[10];
void getans() {
  if (cnt[2] + cnt[7] + cnt[3] > ans) {
    ans = cnt[2] + cnt[7] + cnt[3], x = -1, y = 0;
  }
  if (cnt[2] + cnt[6] + cnt[1] > ans) {
    ans = cnt[2] + cnt[6] + cnt[1], x = 0, y = 1;
  }
  if (cnt[3] + cnt[8] + cnt[4] > ans) {
    ans = cnt[3] + cnt[8] + cnt[4], x = 0, y = -1;
  }
  if (cnt[1] + cnt[5] + cnt[4] > ans) {
    ans = cnt[1] + cnt[5] + cnt[4], x = 1, y = 0;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  vector<int> hasx, hasy;
  cin >> n >> sx >> sy;
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    x -= sx, y -= sy;
    a[i] = {x, y};
  }
  for (int i = 0; i < n; ++i) {
    int x = a[i].first, y = a[i].second;
    if (x < 0) {
      if (y < 0)
        ++cnt[3];
      else if (!y)
        ++cnt[7];
      else
        ++cnt[2];
    } else if (!x) {
      if (y < 0)
        ++cnt[8];
      else
        ++cnt[6];
    } else {
      if (y < 0)
        ++cnt[4];
      else if (!y)
        ++cnt[5];
      else
        ++cnt[1];
    }
  }
  getans();
  cout << ans << '\n';
  x += sx, y += sy;
  cout << x << ' ' << y << '\n';
  return 0;
}
