#include <bits/stdc++.h>
using namespace std;
const long long maxx = 1e9;
int main() {
  long long a, b, mod, t;
  cin >> a >> b >> mod;
  a = min(a, mod - 1);
  t = maxx % mod;
  for (long long i = 1; i <= a; i++) {
    long long need = (mod - (i * t) % mod) % mod;
    if (need > b) {
      printf("1 %09lld\n", i);
      return 0;
    }
  }
  printf("2\n");
  return 0;
}
