#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T pow2(T a) {
  return a * a;
}
template <class T>
inline bool mineq(T a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
void print(long long a) {
  string str;
  while (a) {
    str.push_back(a % 10 + '0');
    a /= 10;
  }
  while (str.size() != 9) str.push_back('0');
  reverse(str.begin(), str.end());
  cout << str;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long a, b, mod;
  cin >> a >> b >> mod;
  long long t = (long long)1e9 % mod, n = -t;
  if (a > 1e7 + 10) a = 1e7 + 10;
  for (int i = 0; i < a + 1; i++) {
    n += t;
    if (n > mod) n -= mod;
    if (n + b < mod && n != 0) {
      cout << "1 ";
      print(i);
      return 0;
    }
  }
  cout << 2;
}
