#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, m;
  cin >> a >> b >> m;
  if (a == 0 || 1000000000 % m == 0)
    cout << "2\n";
  else {
    long long k = min(a, m - 1);
    long long l = 1000000000 % m;
    for (int i = (1); i <= (k); i++) {
      long long temp = ((i % m) * l) % m;
      if (m - temp > b && temp != 0) {
        printf("1\n%.9d\n", i);
        goto last;
      }
    }
    cout << "2\n";
  }
last:
  return 0;
}
