#include <bits/stdc++.h>
char arr[10];
char ans[15];
void getBest(int i, int f) {
  memset(arr, 0, sizeof(arr));
  sprintf(arr, "%09d", i);
  if (!f)
    strncpy(ans, arr, sizeof(arr));
  else if (strncmp(ans, arr, sizeof(arr)) > 0) {
    strncpy(ans, arr, sizeof(arr));
  }
}
int main() {
  for (int a, b, aa, mod; scanf("%d%d%d", &a, &b, &mod) != EOF;) {
    aa = a > mod ? mod : a;
    if (b >= mod) {
      printf("2\n");
      continue;
    }
    int t = ((long long)1000000000 % mod), i, f = 0;
    for (i = 0; i <= aa; i++) {
      int tmp = (int)((long long)i * t % mod);
      if ((mod - tmp) % mod > b) {
        getBest(i, f);
        f = 1;
      }
    }
    if (f)
      printf("1 %s\n", ans);
    else
      printf("2\n");
  }
  return 0;
}
