#include <bits/stdc++.h>
using namespace std;
void require(bool cond, const string& message = "Runtime error") {
  if (!cond) {
    cerr << message << endl;
    assert(false);
  }
}
void readData() {}
string str9(int x) {
  ostringstream os;
  os << x;
  string ret = os.str();
  while (ret.size() < 9) ret = '0' + ret;
  return ret;
}
bool can(int x, int b, int mod) {
  long long y = x;
  for (int i = 0; i < int(9); ++i) {
    y *= 10;
    y %= mod;
  }
  x = (mod - y) % mod;
  return x > b;
}
void solve() {
  int a, b, mod;
  cin >> a >> b >> mod;
  for (int x = 0; x < int(mod); ++x) {
    if (x > a) break;
    if (can(x, b, mod)) {
      cout << 1 << " " << str9(x) << endl;
      return;
    }
  }
  cout << 2 << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  readData();
  solve();
  return 0;
}
