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;
int main() {
  long long int n, s_x, s_y, i, x, y, p1_x, p1_y, p2_x, p2_y, p3_x, p3_y, p4_x,
      p4_y, p5_x, p5_y, p6_x, p6_y;
  long long int cnt1 = 0, cnt2 = 0, cnt3 = 0, cnt4 = 0, cnt5 = 0, cnt6 = 0;
  vector<pair<int, int> > up, down;
  cin >> n >> s_x >> s_y;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    if (y > s_y) up.push_back(make_pair(x, y));
    if (y < s_y) down.push_back(make_pair(x, y));
    if (y == s_y) {
      up.push_back(make_pair(x, y));
      down.push_back(make_pair(x, y));
    }
  }
  p1_x = s_x - 1;
  p1_y = s_y;
  if (p1_x >= 0 && p1_y >= 0 && p1_x <= 1e9 && p1_y <= 1e9) {
    for (i = 0; i < up.size(); i++) {
      if (up[i].first <= p1_x && up[i].second >= p1_y) cnt1++;
    }
  }
  p2_x = s_x;
  p2_y = s_y + 1;
  if (p2_x >= 0 && p2_y >= 0 && p2_x <= 1e9 && p2_y <= 1e9) {
    for (i = 0; i < up.size(); i++) {
      if (up[i].second >= p2_y) cnt2++;
    }
  }
  p3_x = s_x + 1;
  p3_y = s_y;
  if (p3_x >= 0 && p3_y >= 0 && p3_x <= 1e9 && p3_y <= 1e9) {
    for (i = 0; i < up.size(); i++) {
      if (up[i].first >= p3_x && up[i].second >= p3_y) cnt3++;
    }
  }
  p4_x = s_x - 1;
  p4_y = s_y;
  if (p4_x >= 0 && p4_y >= 0 && p4_x <= 1e9 && p4_y <= 1e9) {
    for (i = 0; i < down.size(); i++) {
      if (down[i].first <= p4_x && down[i].second <= p4_y) cnt4++;
    }
  }
  p5_x = s_x;
  p5_y = s_y - 1;
  if (p5_x >= 0 && p5_y >= 0 && p5_x <= 1e9 && p5_y <= 1e9) {
    for (i = 0; i < down.size(); i++) {
      if (down[i].second <= p5_y) cnt5++;
    }
  }
  p6_x = s_x + 1;
  p6_y = s_y;
  if (p6_x >= 0 && p6_y >= 0 && p6_x <= 1e9 && p6_y <= 1e9) {
    for (i = 0; i < down.size(); i++) {
      if (down[i].first >= p6_x && down[i].second <= p6_y) cnt6++;
    }
  }
  long long int mx =
      max(cnt1, max(cnt2, max(cnt3, max(cnt4, max(cnt5, cnt6)))));
  if (mx == cnt1) {
    cout << mx << endl;
    cout << p1_x << " " << p1_y << "\n";
  } else if (mx == cnt2) {
    cout << mx << endl;
    cout << p2_x << " " << p2_y << "\n";
  } else if (mx == cnt3) {
    cout << mx << endl;
    cout << p3_x << " " << p3_y << "\n";
  } else if (mx == cnt4) {
    cout << mx << endl;
    cout << p4_x << " " << p4_y << "\n";
  } else if (mx == cnt5) {
    cout << mx << endl;
    cout << p5_x << " " << p5_y << "\n";
  } else if (mx == cnt6) {
    cout << mx << endl;
    cout << p6_x << " " << p6_y << "\n";
  }
}
