#include <bits/stdc++.h>
using namespace std;
typedef long long int64;
typedef unsigned long long uint64;

int64 sign(int64 x) {
  return x < 0 ? -1 : 1;
}

int64 k, x, y;

vector<pair<int64, int64>> work() {
  int64 x = ::x, y = ::y;
  vector<pair<int64, int64>> ps;
  ps.emplace_back(x, y);
  while (ps.back() != make_pair(0LL, 0LL)) {
    tie(x, y) = ps.back();
    int64 xt = abs(x), yt = abs(y);
    int64 c = xt + yt;

    if (c % k == 0) {
L1:
      int64 dy = min(k, yt);
      y -= sign(y) * dy;
      x -= sign(x) * (k - dy);
      ps.emplace_back(x, y);
      continue;
    }

    bool flag = false;
    int64 p, q;
    if ((k + c % k) % 2 == 0 && max(xt, yt) >= (k + c % k) / 2) {
      p = (k + c % k) / 2;
      q = k - p;
      flag = true;
    } else if ((c % k) % 2 == 0) {
      p = (c % k) / 2;
      q = k - p;
      flag = true;
    }

    if (flag) {
      if (xt >= yt) {
        x -= sign(x) * p;
        y += sign(y) * q;
      } else {
        y -= sign(y) * p;
        x += sign(x) * q;
      }
      ps.emplace_back(x, y);
      continue;
    }

    if (c >= k) {
      goto L1;
    } else if (c % 2 == 1) {
      if (k % 2 == 0) {
        return vector<pair<int64, int64>>();
      }
      int64 o = (k - c) / 2;
      ps.emplace_back(sign(x) * (c + o), sign(y) * (k - o));
      ps.emplace_back(sign(x) * k, 0);
    } else {
      if (x >= c / 2) {
        ps.emplace_back(c / 2, sign(y) * (k - c / 2));
      } if (x >= 0) {
        ps.emplace_back(-(k - c / 2), sign(y) * (c / 2));
      } else if (x >= -c / 2) {
        ps.emplace_back((k - c / 2), sign(y) * (c / 2));
      } else if (x >= -c) {
        ps.emplace_back(-(c / 2), sign(y) * (k - c / 2));
      } else {
        assert(false);
      }
      ps.emplace_back(0LL, 0LL);
    }
  }

  ps.pop_back();
  reverse(ps.begin(), ps.end());
  return ps;
}

bool check(const vector<pair<int64, int64>>& tps) {
  static const int64 N = 1000;
  static bool vis[N * 2 + 1][N * 2 + 1];
  vector<tuple<int64, int64, int64>> ps;

  int64 x = 0, y = 0, d = 0;
  if (!tps.empty()) {
    for (const auto& pr : tps) {
      if (abs(x - pr.first) + abs(y - pr.second) != k) {
        cout << "x:" << x << " y:" << y << " pr:" << pr.first << "," << pr.second << "\n";
        goto L2;
      }
      x = pr.first, y = pr.second;
    }
    if (x != ::x || y != ::y) {
      goto L2;
    }
  }

  fill(vis[0], vis[N * 2 + 1], false);

  ps.emplace_back(0LL, 0LL, 0LL);
  vis[N][N] = true;

  for (size_t i = 0; i < ps.size(); ++i) {
    tie(x, y, d) = ps[i];
    for (int64 dx = -k; dx <= k; ++dx) {
      for (int64 dy : { k - abs(dx), -k + abs(dx) }) {
        int64 xt = x + dx, yt = y + dy;
        if (xt < -N || xt > N || yt < -N || yt > N) continue;
        if (vis[N + xt][N + yt]) continue;
        ps.emplace_back(xt, yt, d + 1);
        vis[N + xt][N + yt] = true;
        if (xt == ::x && yt == ::y) {
          if (size_t(d + 1) != tps.size()) goto L2;
          return true;
        }
      }
    }
  }

  if (!tps.empty()) {
    goto L2;
  }
  return true;

L2:
  cout << "tps.size:" << tps.size() << " d:" << d << "\n";
  for (const auto& o : tps) {
    cout << o.first << " " << o.second << "\n";
  }
  cout << endl;
  return false;
}

void test() {
  default_random_engine rng(time(nullptr));
  while (true) {
    k = uniform_int_distribution<int64>{1, 100}(rng);
    x = uniform_int_distribution<int64>{-100, 100}(rng);
    y = uniform_int_distribution<int64>{-100, 100}(rng);
    cout << "k:" << k << " x:" << x << " y:" << y << endl;
    if (!check(work())) {
      return;
    }
  }
}

int main() {
  ios_base::sync_with_stdio(false);
  cin >> k >> x >> y;

  auto ps = work();
  if (ps.empty()) {
    cout << "-1\n";
  } else {
    cout << ps.size() << "\n";
    for (auto pr : ps) {
      cout << pr.first << " " << pr.second << "\n";
    }
  }
  return 0;
}


Measured memory_bytes: 6000