#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  long long i, j, k, cc;
  bool sw = true;
  for (i = 0; i < c && i <= a; i++) {
    cc = (i * 1000000000) % c;
    cc = (c - cc) % c;
    if (cc > b) {
      sw = false;
      break;
    }
  }
  if (sw)
    cout << 2 << endl;
  else {
    printf("1 %09d\n", i);
  }
}
