#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, mod, i, j;
  while (cin >> a >> b >> mod) {
    int e = (int)1e9;
    int win = 2;
    if (a > mod) a = mod;
    for (i = 1; i <= a; ++i) {
      if ((mod - (long long)i * e % mod) % mod > b) {
        win = 1;
        break;
      }
    }
    printf("%d", win);
    if (win == 1) printf(" %09d", i);
    puts("");
  }
}
