#include <cassert>
#include <cstdio>
#include <algorithm>
#include <utility>
#include <vector>

using namespace std;

int main()
{
  assert(freopen("manhat.in", "r", stdin) == stdin);
  assert(freopen("manhat.out", "w", stdout) == stdout);

  int n, t, d, x, y;
  assert(scanf("%d%d%d", &t, &d, &n) == 3);
  // x' = x + y
  // y' = x - y
  int cx1 = 0, cx2 = 0, cy1 = 0, cy2 = 0;
  for (int i = 0; i < n; i++)
  {
    assert(scanf("%d%d", &x, &y) == 2);
    cx1 -= t, cy1 -= t, cx2 += t, cy2 += t;
    int ax1 = x + y - t, ay1 = x - y - t, ax2 = x + y + t, ay2 = x - y + t;
    cx1 = max(cx1, ax1), cx2 = min(cx2, ax2);
    cy1 = max(cy1, ay1), cy2 = min(cy2, ay2);
    assert(cx1 <= cx2 && cy1 <= cy2);
  }
  vector <pair <int, int> > ans;
  for (int x = cx1; x <= cx2; x++)
    for (int y = cy1; y <= cy2; y++)
      if ((x + y) % 2 == 0)
        ans.push_back(make_pair((x + y) / 2, (x - y) / 2));
  printf("%d\n", ans.size());
  for (int i = 0; i < (int)ans.size(); i++)
    printf("%d %d\n", ans[i].first, ans[i].second);

  return 0;
}

