#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, m;
  scanf("%I64d%I64d%I64d", &a, &b, &m);
  if (b >= m)
    printf("2\n");
  else {
    long long f = 1, ans;
    if (a > m) a = m;
    for (long long i = 0; i <= a; i++) {
      long long x = i * 1000000000;
      x %= m;
      if (x == 0) continue;
      x = m - x;
      if (x > b) {
        f = 0;
        ans = i;
        break;
      }
    }
    if (f)
      printf("2\n");
    else {
      printf("1 ");
      long long x = 0, y = ans;
      while (y) {
        x++;
        y /= 10;
      }
      x = 9 - x;
      while (x--) printf("0");
      printf("%I64d\n", ans);
    }
  }
  return 0;
}
