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, sx, sy;
  cin >> n >> sx >> sy;
  long long int arr[n][2];
  for (int i = 0; i < n; i++) cin >> arr[i][0] >> arr[i][1];
  long long int a = 0, b = 0, c = 0, d = 0;
  long long int up_x = sx, up_y = sy + 1;
  long long int down_x = sx, down_y = sy - 1;
  long long int right_x = sx + 1, right_y = sy;
  long long int left_x = sx - 1, left_y = sy;
  for (int i = 0; i < n; i++) {
    long long int d = abs(arr[i][0] - sx) + abs(arr[i][1] - sy);
    long long int d_a = abs(arr[i][0] - up_x) + abs(arr[i][1] - up_y) + 1;
    long long int d_b = abs(arr[i][0] - right_x) + abs(arr[i][1] - right_y) + 1;
    long long int d_c = abs(arr[i][0] - down_x) + abs(arr[i][1] - down_y) + 1;
    long long int d_d = abs(arr[i][0] - left_x) + abs(arr[i][1] - left_y) + 1;
    if (d_a <= d) {
      a++;
    }
    if (d_b <= d) {
      b++;
    }
    if (d_c <= d) {
      c++;
    }
    if (d_d <= d) {
      d++;
    }
  }
  if ((sx == 0) && (sy == 0)) {
    long long int maxi = max(a, b);
    cout << maxi << endl;
    if ((maxi == a) && ((up_x >= 0) && (up_y >= 0)) &&
        ((up_x <= 1000000000) && (up_y <= 1000000000)))
      cout << up_x << " " << up_y << endl;
    else if ((maxi == b) && ((right_x >= 0) && (right_y >= 0)) &&
             ((right_x <= 1000000000) && (right_y <= 1000000000)))
      cout << right_x << " " << right_y << endl;
  } else if ((sx == 1000000000) && (sy == 1000000000)) {
    long long int maxi = max(c, d);
    cout << maxi << endl;
    if ((maxi == c) && ((down_x >= 0) && (down_y >= 0)) &&
        ((down_x <= 1000000000) && (down_y <= 1000000000)))
      cout << down_x << " " << down_y << endl;
    else if ((maxi == d) && ((left_x >= 0) && (left_y >= 0)) &&
             ((left_x <= 1000000000) && (left_y <= 1000000000)))
      cout << left_x << " " << left_y << endl;
  } else if ((sx == 0) && (sy != 0)) {
    long long int maxi = max(a, max(b, c));
    cout << maxi << endl;
    if ((maxi == a) && ((up_x >= 0) && (up_y >= 0)) &&
        ((up_x <= 1000000000) && (up_y <= 1000000000)))
      cout << up_x << " " << up_y << endl;
    else if ((maxi == b) && ((right_x >= 0) && (right_y >= 0)) &&
             ((right_x <= 1000000000) && (right_y <= 1000000000)))
      cout << right_x << " " << right_y << endl;
    else if ((maxi == c) && ((down_x >= 0) && (down_y >= 0)) &&
             ((down_x <= 1000000000) && (down_y <= 1000000000)))
      cout << down_x << " " << down_y << endl;
  } else if ((sx != 0) && (sy == 0)) {
    long long int maxi = max(a, max(b, d));
    cout << maxi << endl;
    if ((maxi == a) && ((up_x >= 0) && (up_y >= 0)) &&
        ((up_x <= 1000000000) && (up_y <= 1000000000)))
      cout << up_x << " " << up_y << endl;
    else if ((maxi == b) && ((right_x >= 0) && (right_y >= 0)) &&
             ((right_x <= 1000000000) && (right_y <= 1000000000)))
      cout << right_x << " " << right_y << endl;
    else if ((maxi == d) && ((left_x >= 0) && (left_y >= 0)) &&
             ((left_x <= 1000000000) && (left_y <= 1000000000)))
      cout << left_x << " " << left_y << endl;
  } else {
    long long int maxi = max(a, max(b, max(c, d)));
    cout << maxi << endl;
    if ((maxi == a) && ((up_x >= 0) && (up_y >= 0)) &&
        ((up_x <= 1000000000) && (up_y <= 1000000000)))
      cout << up_x << " " << up_y << endl;
    else if ((maxi == b) && ((right_x >= 0) && (right_y >= 0)) &&
             ((right_x <= 1000000000) && (right_y <= 1000000000)))
      cout << right_x << " " << right_y << endl;
    else if ((maxi == c) && ((down_x >= 0) && (down_y >= 0)) &&
             ((down_x <= 1000000000) && (down_y <= 1000000000)))
      cout << down_x << " " << down_y << endl;
    else if ((maxi == d) && ((left_x >= 0) && (left_y >= 0)) &&
             ((left_x <= 1000000000) && (left_y <= 1000000000)))
      cout << left_x << " " << left_y << endl;
  }
  return 0;
}
