#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, mod;
  while (scanf("%d%d%d", &a, &b, &mod) != EOF) {
    if (b >= mod - 1) {
      printf("2\n");
      continue;
    }
    bool found = false;
    int ans;
    for (int i = 0; i < min(mod, a + 1); ++i) {
      int rem = 1000000000LL * i % mod;
      int le = rem, ri = (rem + b) % mod;
      if (le <= ri && !(le <= 0 && 0 <= ri)) {
        ans = i;
        found = true;
        break;
      }
    }
    if (found)
      printf("1 %09d\n", ans);
    else
      printf("2\n");
  }
  return 0;
}
