#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, mod;
  cin >> a >> b >> mod;
  for (int j = 0; j < min(a + 1, mod); j++) {
    long long theta = 1ll * j * 1e9;
    theta %= mod;
    theta = mod - theta;
    theta %= mod;
    if (theta <= b) continue;
    cout << 1 << endl;
    cout.width(9);
    cout.fill('0');
    cout << j << endl;
    return 0;
  }
  puts("2");
}
