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;
long long mod = 1e9 + 7;
long long g, h, l;
const int N = 100005;
int arr[N];
int main() {
  long long n, sx, sy;
  cin >> n >> sx >> sy;
  vector<pair<long long, long long>> v;
  for (long long i = 1; i <= n; i++) {
    cin >> g >> h;
    v.push_back({g - sx, h - sy});
  }
  bool ans1 = false, ans2 = false, ans3 = false, ans4 = false;
  long long ans = 0, cnt = 0;
  for (auto i : v) {
    if (i.second >= 1) {
      cnt++;
      cout << i.first << " " << i.second << endl;
    }
  }
  if (cnt >= ans) {
    ans1 = true;
  }
  ans = max(ans, cnt);
  cnt = 0;
  for (auto i : v) {
    if (i.second <= -1) cnt++;
  }
  if (cnt >= ans) {
    ans2 = true;
  }
  ans = max(ans, cnt);
  cnt = 0;
  for (auto i : v) {
    if (i.first >= 1) cnt++;
  }
  if (cnt >= ans) {
    ans3 = true;
  }
  ans = max(ans, cnt);
  cnt = 0;
  for (auto i : v) {
    if (i.first <= -1) cnt++;
  }
  if (cnt >= ans) {
    ans4 = true;
  }
  ans = max(ans, cnt);
  cout << ans << endl;
  if (ans4) {
    cout << sx - 1 << " " << sy;
  } else if (ans3) {
    cout << sx + 1 << " " << sy;
  } else if (ans2) {
    cout << sx << " " << sy - 1;
  } else {
    cout << sx << " " << sy + 1;
  }
}
