#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:100000000")
int main() {
  int a, b, mod;
  scanf("%d%d%d", &a, &b, &mod);
  int c = 1000000000 % mod;
  for (int i = 0; i <= min(mod - 1, a); ++i) {
    int x = (long long)i * c % mod;
    if ((mod - x) % mod > b) {
      printf("1 %09d\n", i);
      return 0;
    }
  }
  printf("2\n");
  return 0;
}
