#include <bits/stdc++.h>
using namespace std;
const int maxn = 100500;
int main() {
  long long a, b, m;
  cin >> a >> b >> m;
  for (int i = 0; i <= min(a, m); i++) {
    long long o = (long long)(1e9 * i) % m;
    if (o && m - o > b) {
      printf("1 %09d\n", i);
      return 0;
    }
  }
  cout << 2 << endl;
  return 0;
}
