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;
struct node {
  int a, b, cnt;
  node(int a, int b, int cnt) {
    this->a = a;
    this->b = b;
    this->cnt = cnt;
  }
};
vector<node> p;
int main() {
  int n, sx, sy;
  cin >> n >> sx >> sy;
  p.push_back(node(sx - 1, sy - 1, 0));
  p.push_back(node(sx - 1, sy, 0));
  p.push_back(node(sx - 1, sy + 1, 0));
  p.push_back(node(sx, sy - 1, 0));
  p.push_back(node(sx, sy + 1, 0));
  p.push_back(node(sx + 1, sy - 1, 0));
  p.push_back(node(sx + 1, sy, 0));
  p.push_back(node(sx + 1, sy + 1, 0));
  for (int i = 1; i <= n; i++) {
    int a, b;
    cin >> a >> b;
    for (int j = 0; j < p.size(); j++) {
      if (p[j].a >= min(a, sx) && p[j].a <= max(a, sx)) {
        if (p[j].b >= min(b, sy) && p[j].b <= max(b, sy)) {
          p[j].cnt++;
          continue;
        }
      }
    }
  }
  node maxx = node(0, 0, 0);
  for (int i = 0; i < p.size(); i++) {
    if (p[i].cnt > maxx.cnt) maxx = p[i];
  }
  cout << maxx.cnt << endl;
  cout << maxx.a << " " << maxx.b << endl;
  return 0;
}
