#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
signed main() {
  long long int a, b, mod;
  cin >> a >> b >> mod;
  long long int ans = -1, p = 1;
  for (long long int i = 0; i < 9; ++i) p = (p * 10) % mod;
  for (long long int i = 0; i <= min(max(0ll, mod - 1), a); ++i) {
    long long int now = (i * p) % mod;
    long long int need = (mod - now) % mod;
    if (need > b) {
      ans = i;
      break;
    }
  }
  if (ans == -1)
    cout << 2 << "\n";
  else {
    string num = to_string(ans);
    while (num.size() < 9) num.insert(0, "0");
    cout << 1 << " " << num << "\n";
  }
  return 0;
}
