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;
void solve(int n, int ax[], int ay[], int a, int b, int x1, int y1, int &ans) {
  int a1 = a, b1 = b;
  for (int i = 0; i < n; i++) {
    int x = ax[i];
    int y = ay[i];
    if (a > x) {
      int temp = a;
      a = x;
      x = temp;
    }
    if (b > y) {
      int temp = b;
      b = y;
      y = temp;
    }
    if (x1 >= 0 && x1 <= 1000000000 && x1 >= a && x1 <= x) {
      if (y1 >= 0 && y1 <= 1000000000 && y1 >= b && y1 <= y) {
        ans++;
      }
    }
    a = a1;
    b = b1;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, a, b;
  cin >> n >> a >> b;
  int ax[n];
  int ay[n];
  for (int i = 0; i < n; i++) {
    cin >> ax[i] >> ay[i];
  }
  int x1, x2, x3, x4, y1, y2, y3, y4;
  int o1 = 0, o2 = 0, o3 = 0, o4 = 0;
  x1 = a;
  y1 = b - 1;
  x2 = a;
  y2 = b + 1;
  x3 = a - 1;
  y3 = b;
  x4 = a + 1;
  y4 = b;
  solve(n, ax, ay, a, b, x1, y1, o1);
  solve(n, ax, ay, a, b, x2, y2, o2);
  solve(n, ax, ay, a, b, x3, y3, o3);
  solve(n, ax, ay, a, b, x4, y4, o4);
  if (o1 >= o2 && o1 >= o3 && o1 >= o4) {
    cout << o1 << endl;
    cout << x1 << " " << y1;
  } else if (o2 >= o1 && o2 >= o3 && o2 >= o4) {
    cout << o2 << endl;
    cout << x2 << " " << y2;
  } else if (o3 >= o1 && o3 >= o2 && o3 >= o4) {
    cout << o3 << endl;
    cout << x3 << " " << y3;
  } else if (o4 >= o1 && o4 >= o3 && o4 >= o2) {
    cout << o4 << endl;
    cout << x4 << " " << y4;
  }
  return 0;
}
