#include <bits/stdc++.h>
using namespace std;
void solve() {
  int a, b, mod;
  cin >> a >> b >> mod;
  long long initMod = 0;
  bool fir = false;
  if (a == 0) {
    cout << 2 << endl;
    return;
  }
  for (long long i = 1; i <= a; i++) {
    long long num = i;
    for (int j = 0; j < 9; j++) num *= 10;
    if (!fir && num % mod == 0) break;
    int left = (num % mod);
    if (mod - left == 0) {
    } else {
      int t = mod - left;
      if (t <= b) {
      } else {
        cout << 1 << " ";
        stringstream ss;
        ss << i;
        string res = ss.str();
        int v = 9 - res.size();
        for (int i = 0; i < v; i++) res = '0' + res;
        cout << res << endl;
        return;
      }
    }
  }
  cout << 2 << endl;
}
int main() {
  solve();
  return 0;
}
