#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, mod;
  while (cin >> a >> b >> mod) {
    if (b >= mod || 1000000000 % mod == 0)
      cout << 2 << endl;
    else {
      bool flag = false;
      long long large = min(a, mod - 1);
      for (long long i = 1LL; i <= large; i++) {
        if (i * 1000000000LL % mod + b < mod && i * 1000000000LL % mod != 0) {
          printf("1 %09d\n", i);
          flag = true;
          break;
        }
      }
      if (!flag) printf("2\n");
    }
  }
  return 0;
}
