#include <bits/stdc++.h>
using namespace std;
const int LOG = 18;
const int NN = (int)1e5 + 5;
const int MaxN = (int)5e5 + 5;
const int MOD = 998244353;
const int INF = INT_MAX - 1;
int mul(int x, int y) { return (1LL * x * y) % MOD; }
int add(int x, int y) { return (0LL + x + y) % MOD; }
void norm_add(int& x, int y) {
  x += y;
  if (x >= MOD) x -= MOD;
}
int fast_pow(int x, int y) {
  if (y == 0) return 1;
  if (y & 1)
    return mul(x, fast_pow(x, y - 1));
  else {
    int aux = fast_pow(x, y >> 1);
    return mul(aux, aux);
  }
}
int inv(int x) { return fast_pow(x, MOD - 2); }
int two(int x) { return 1 << x; }
bool contain(int mask, int bit) { return (mask & two(bit)) > 0; }
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int mod;
int a, b;
int main() {
  ios_base::sync_with_stdio(0);
  scanf("%d%d%d", &a, &b, &mod);
  long long x = 1;
  for (int i = 0; i < 9; i++) {
    x *= 10;
  }
  vector<bool> seen(mod);
  for (int i = 0; i <= mod * 2 && i <= b; i++) {
    seen[i % mod] = true;
  }
  long long add = 1e9;
  long long v = 1;
  long long ans = -1;
  for (int i = 0; i <= mod * 2 && v <= a; i++) {
    if (seen[(mod - x % mod) % mod] == false) {
      ans = v;
      break;
    }
    v++;
    x += add;
  }
  if (ans == -1)
    printf("2\n");
  else {
    printf("1 ");
    stringstream ss;
    ss << ans;
    string s;
    ss >> s;
    while (((int)s.size()) < 9) s = "0" + s;
    printf("%s\n", s.c_str());
  }
  return 0;
}
