#include <bits/stdc++.h>
using namespace std;
bool check(long long int a, long long int b, long long int mod) {
  if (a % mod == 0) return 0;
  long long int x = ((a % mod) * 1000000000) % mod;
  if (x == 0) return 0;
  if (mod - x <= b) return 0;
  return 1;
}
int count(int n) {
  int c = 0;
  while (n) {
    n /= 10;
    c++;
  }
  return c;
}
int main() {
  long long int a, b, mod, end1;
  cin >> a >> b >> mod;
  if (a < mod)
    end1 = a;
  else
    end1 = mod - 1;
  for (long long int i = 0; i <= end1; i++) {
    if (check(i, b, mod)) {
      cout << 1 << " ";
      int c = count(i);
      for (int j = 0; j < 9 - c; ++j) cout << 0;
      cout << i << endl;
      return 0;
    }
  }
  cout << 2 << endl;
  return 0;
}
