#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
int a, b, c, d, i, j, n, m, k, mod;
int main() {
  scanf("%d%d%d", &a, &b, &mod);
  if (a > mod) a = mod;
  for (int _n((a + 1) - 1), first(0); first <= _n; first++) {
    int q = ((long long)first * 1000000000) % mod;
    if (q == 0 || q + b >= mod) continue;
    printf("1 %09d\n", first);
    exit(0);
  }
  printf("2\n");
}
