#include <bits/stdc++.h>
using namespace std;
string f(long long x) {
  string s = "";
  while (x) {
    s = char(int(x % 10) + 48) + s;
    x = x / 10;
  }
  while (s.size() < 9) s = '0' + s;
  return s;
}
int main() {
  long long a, b, md;
  cin >> a >> b >> md;
  for (long long i = 0; i <= min(a, md - 1); i++) {
    long long ch = ((1000000000 % md) * i) % md;
    if (ch != 0 && ch + b < md) {
      cout << 1 << " " << f(i) << endl;
      return 0;
    }
  }
  cout << 2 << endl;
  return 0;
}
