#include <bits/stdc++.h>
using namespace std;
int a, b, mod;
int main() {
  cin >> a >> b >> mod;
  if (b >= mod) {
    cout << "2\n";
    return 0;
  }
  int val = mod - b;
  int mul = (1000000000) % mod;
  for (int cur = 0; cur <= a && cur < mod; ++cur)
    if (((long long)cur * mul) % mod < val &&
        ((long long)cur * mul) % mod > 0) {
      printf("1 %09d\n", cur);
      return 0;
    }
  cout << "2\n";
}
