#include <bits/stdc++.h>
int main() {
  int a, b, c;
  int p = 1;
  scanf("%d%d%d", &a, &b, &c);
  for (int i = 0; i < 9; i++) p = p * 10 % c;
  for (long long i = 0; i < c && i <= a; i++) {
    int t = (c - (i * p) % c) % c;
    if (t > b) {
      printf("1 %.9d\n", (int)i);
      return 0;
    }
  }
  printf("2\n");
  return 0;
}
