#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-7;
const long double pi = 3.1415926535897932384626433832795;
int main() {
  long long a, b, mod, ans = -1;
  cin >> a >> b >> mod;
  for (int i = 0; i < min(a, mod) + 1; i++) {
    int ost = (1000000000ll * (i + 0ll)) % mod;
    if (ost && b <= mod - ost - 1) {
      cout << 1 << " ";
      int ans = i;
      string s = "";
      while (ans) {
        s = char(ans % 10 + 48) + s;
        ans /= 10;
      }
      while (s.size() < 9) s = '0' + s;
      cout << s << endl;
      return 0;
    }
  }
  cout << 2 << endl;
  return 0;
}
