#include <bits/stdc++.h>
using namespace std;
string ans(long int j) {
  char s[10] = {'\0'};
  sprintf(s, "%ld", j);
  int l = strlen(s);
  int i;
  string p("000000000");
  for (i = 9 - l, j = 0; i < 9; i++, j++) p[i] = s[j];
  return p;
}
int main() {
  long int a, b, m;
  scanf("%ld %ld %ld", &a, &b, &m);
  long int k = (1000000000 % m);
  long int l = m - k, c = k;
  long int i = 0;
  if (c == 0) goto print;
  while (l == m || l <= b) {
    k += (l / c + 1) * c;
    i += l / c + 1;
    k %= m;
    l = m - k;
    if (i >= m || i + 1 > a) goto print;
  }
print:
  if (i == m || i + 1 > a || c == 0) {
    printf("2");
  } else
    cout << "1 " << ans(i + 1) << endl;
end:
  return 0;
}
