#include <bits/stdc++.h>
using namespace std;
int a, b, m;
int main() {
  cin >> a >> b >> m;
  long long d = 1000000000 % m;
  if (b >= m - 1) {
    printf("2\n");
    return 0;
  }
  for (int i = 0; i <= min(m - 1, a); i++) {
    long long r = d * i % m;
    if (r == 0) continue;
    if (r + b >= m) continue;
    printf("1 %09d\n", i);
    return 0;
  }
  printf("2\n");
  return 0;
}
