#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, mod;
  cin >> a >> b >> mod;
  if (b >= mod - 1)
    printf("2\n");
  else {
    int flag = 0;
    for (long long x = 0; x <= a && x < mod; x++) {
      long long temp = x * 1000000000 % mod;
      temp = (mod - temp) % mod;
      if (temp > b) {
        printf("1 ");
        int count = 0;
        long long y = x;
        while (y) {
          count++;
          y /= 10;
        }
        for (int i = 0; i < (9 - count); i++) cout << '0';
        cout << x << endl;
        flag = 1;
        break;
      }
    }
    if (flag == 0) printf("2\n");
  }
  return 0;
}
