#include <bits/stdc++.h>
using namespace std;
long long a, b, mod;
long long t = 1e9;
string makestr(long long inp) {
  int digits = 0;
  string s = "000000000";
  string res = to_string(inp);
  while (inp >= pow(10, digits)) {
    digits++;
  }
  res = s.substr(0, 9 - digits) + res;
  return res;
}
int main() {
  cin >> a >> b >> mod;
  if (b >= mod - 1 or t % mod == 0) {
    cout << 2;
    return 0;
  }
  for (long long i = 1; i <= mod - 1 and i <= a; i++) {
    if (mod - (i * t) % mod > b and (i * t) % mod != 0) {
      cout << 1 << " " << makestr(i);
      return 0;
    }
  }
  cout << 2;
}
