#include <bits/stdc++.h>
using namespace std;
char rs[20];
int main() {
  int a, b, k, m, f = 0, ans = 1;
  cin >> a >> b >> k;
  m = 1000000000 % k;
  if (b + 1 >= k || m == 0 || a == 0)
    cout << "2";
  else {
    while (ans <= min(a, k)) {
      if ((long long)ans * m % k < k - b &&
          (long long)ans * 1000000000 % k != 0) {
        f = 1;
        break;
      }
      ans++;
    }
    if (f) {
      cout << "1" << ' ';
      sprintf(rs, "%d", ans);
      k = strlen(rs);
      for (int i = 0; i < 9 - k; i++) cout << "0";
      cout << rs;
    } else
      cout << "2";
  }
  return 0;
}
