#include <bits/stdc++.h>
using namespace std;
const int INF = 1000 * 1000 * 1000;
const long long INF64 = 1000LL * 1000LL * 1000LL * 1000LL * 1000LL * 1000LL;
long long a, b, mod;
void Load() { cin >> a >> b >> mod; }
void Solve() {
  long long z = INF % mod;
  for (int i = 1; i <= min(a, mod); i++) {
    int q = (z * (long long)i) % mod;
    if (q > 0 && mod - q > b) {
      printf("1 %09d", i);
      return;
    }
  }
  cout << 2;
  return;
}
int main() {
  Load();
  Solve();
  return 0;
}
