#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, m;
  long long ans, tmp;
  long long t = 1000000000;
  scanf("%I64d%I64d%I64d", &a, &b, &m);
  tmp = t % m;
  if (tmp == 0 || b >= m - 1)
    printf("2\n");
  else {
    bool ok = false;
    for (int i = 1; i < m; ++i) {
      if (i > a) break;
      if ((m - (tmp * i) % m) % m > b) {
        ok = true;
        ans = i;
        break;
      }
    }
    if (!ok)
      printf("2\n");
    else {
      printf("1 ");
      printf("%09I64d", ans);
      printf("\n");
    }
  }
  return 0;
}
