#include <cstdio>
#include <algorithm>
#include <cassert>

using namespace std;

const int maxT = 100;
const int maxD = 100;
const int maxN = 100;

struct rect
{
  int x0, y0, x1, y1;
  rect() {}
  rect( int x, int y ): x0(x), y0(y), x1(x), y1(y) {}
  rect( int _x0, int _y0, int _x1, int _y1 ):
    x0(_x0), y0(_y0), x1(_x1), y1(_y1) {}
  void inter( rect b )
  {
    x0 = max(x0, b.x0); y0 = max(y0, b.y0);
    x1 = min(x1, b.x1); y1 = min(y1, b.y1);
  }
};

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

  int t, d, n;
  assert(scanf("%d%d%d", &t, &d, &n) == 3);
  assert(1 <= t && t <= maxT);
  assert(1 <= d && d <= maxD);
  assert(1 <= n && n <= maxN);
  rect cur(0, 0);
  for (int i = 0; i < n; i++)
  {
    int x, y;
    assert(scanf("%d%d", &x, &y));
    assert("Data is correct?");
    int xx = x + y, yy = x - y;
    cur.x0 -= t; cur.x1 += t;
    cur.y0 -= t; cur.y1 += t;
    cur.inter(rect(xx - d, yy - d, xx + d, yy + d));
  }
  assert(cur.x0 <= cur.x1);
  assert(cur.y0 <= cur.y1);
  int ans = 0;
  for (int x = cur.x0; x <= cur.x1; x++)
    for (int y = cur.y0; y <= cur.y1; y++)
      if ((x + y) % 2 == 0)
        ans++;
  assert(ans > 0);
  printf("%d\n", ans);
  for (int x = cur.x0; x <= cur.x1; x++)
    for (int y = cur.y0; y <= cur.y1; y++)
      if ((x + y) % 2 == 0)
        printf("%d %d\n", (x + y) / 2, (x - y) / 2);

  return 0;
}
