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>
int main() {
  long long int n, sx, sy;
  std::cin >> n >> sx >> sy;
  std::vector<std::vector<std::pair<long long int, long long int> > > v(4);
  std::vector<std::vector<std::pair<long long int, long long int> > > v1(4);
  for (int i = 0; i < n; i++) {
    std::pair<int, int> temp;
    std::cin >> temp.first >> temp.second;
    long long int x = temp.first;
    long long int y = temp.second;
    if ((x - sx) > 0 && (y - sy) > 0)
      v[0].push_back(temp);
    else if ((x - sx) < 0 && (y - sy) > 0)
      v[1].push_back(temp);
    else if ((x - sx) < 0 && (y - sy) < 0)
      v[2].push_back(temp);
    else if ((x - sx) > 0 && (y - sy) < 0)
      v[3].push_back(temp);
    else {
      if ((x - sx) == 0) {
        if ((y - sy) > 0) {
          v1[0].push_back(temp);
        } else {
          v1[2].push_back(temp);
        }
      } else {
        if ((x - sx) > 0) {
          v1[3].push_back(temp);
        } else {
          v1[1].push_back(temp);
        }
      }
    }
  }
  long long int a[4][4];
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      if ((i - j) == 2 || (i - j) == (-2) || i == j)
        a[i][j] = -1;
      else {
        long long int err;
        if ((i == 0 && j == 1) || (i == 1 && j == 0)) {
          err = v1[0].size();
        } else if ((i == 1 && j == 2) || (i == 2 && j == 1)) {
          err = v1[1].size();
        } else if ((i == 2 && j == 3) || (i == 3 && j == 2)) {
          err = v1[2].size();
        } else if ((i == 3 && j == 0) || (i == 0 && j == 3)) {
          err = v1[3].size();
        }
        a[i][j] = v[i].size() + v[j].size() + err;
      }
    }
  }
  long long int max = 0;
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      max = std::max(max, a[i][j]);
    }
  }
  long long int fir, sec;
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      long long int err;
      if ((i == 0 && j == 1) || (i == 1 && j == 0)) {
        err = v1[0].size();
      } else if ((i == 1 && j == 2) || (i == 2 && j == 1)) {
        err = v1[1].size();
      } else if ((i == 2 && j == 3) || (i == 3 && j == 2)) {
        err = v1[2].size();
      } else if ((i == 3 && j == 0) || (i == 0 && j == 3)) {
        err = v1[3].size();
      }
      if ((v[i].size() + v[j].size() + err) == max) {
        fir = std::min(i, j);
        sec = (i + j) - fir;
      }
    }
  }
  if ((fir + sec) % 4 == 1) {
    long long int min_y = 100000000000;
    for (auto it = v[fir].begin(); it != v[fir].end(); it++) {
      min_y = std::min(min_y, (*it).second);
    }
    for (auto it = v[sec].begin(); it != v[sec].end(); it++) {
      min_y = std::min(min_y, (*it).second);
    }
    if ((fir == 0 && sec == 1) || (fir == 1 && sec == 0)) {
      for (auto it = v1[0].begin(); it != v1[0].end(); it++) {
        min_y = std::min(min_y, (*it).second);
      }
    } else if ((fir == 2 && sec == 3) || (fir == 3 && sec == 2)) {
      for (auto it = v1[2].begin(); it != v1[2].end(); it++) {
        min_y = std::min(min_y, (*it).second);
      }
    }
    std::cout << max << std::endl << sx << ' ' << min_y << std::endl;
  } else {
    long long int min_x = 100000000000;
    for (auto it = v[fir].begin(); it != v[fir].end(); it++) {
      min_x = std::min(min_x, (*it).first);
    }
    for (auto it = v[sec].begin(); it != v[sec].end(); it++) {
      min_x = std::min(min_x, (*it).first);
    }
    if ((fir == 1 && sec == 2) || (fir == 2 && sec == 1)) {
      for (auto it = v1[1].begin(); it != v1[1].end(); it++) {
        min_x = std::min(min_x, (*it).first);
      }
    } else if ((fir == 3 && sec == 0) || (fir == 0 && sec == 3)) {
      for (auto it = v1[3].begin(); it != v1[3].end(); it++) {
        min_x = std::min(min_x, (*it).first);
      }
    }
    std::cout << max << std::endl << min_x << ' ' << sy << std::endl;
  }
}
