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() {
  freopen("in.txt", "r", stdin);
  int i, j, k;
  int n, m, t;
  pair<int, int> s;
  scanf("%d", &n), scanf("%d%d", &s.first, &s.second);
  pair<int, int> a[n];
  for (i = 0; i < n; i++) scanf("%d%d", &a[i].first, &a[i].second);
  map<char, int> mp;
  for (i = 0; i < n; i++) {
    if (a[i].first > s.first)
      mp['R']++;
    else if (a[i].first < s.first)
      mp['L']++;
    if (a[i].second > s.second)
      mp['U']++;
    else if (a[i].second < s.second)
      mp['D']++;
  }
  int mx = 0;
  pair<int, int> ans;
  if (s.first + 1 >= 0 && s.second >= 0 && mx < mp['R'])
    ans = {s.first + 1, s.second}, mx = mp['R'];
  if (s.first - 1 >= 0 && s.second >= 0 && mx < mp['L'])
    ans = {s.first - 1, s.second}, mx = mp['L'];
  if (s.first >= 0 && s.second + 1 >= 0 && mx < mp['U'])
    ans = {s.first, s.second + 1}, mx = mp['U'];
  if (s.first >= 0 && s.second - 1 >= 0 && mx < mp['D'])
    ans = {s.first, s.second - 1}, mx = mp['D'];
  printf("%d", mx), printf("\n");
  ;
  if (mx) printf("%d %d", ans.first, ans.second);
  return 0;
}
