#include <bits/stdc++.h>
using namespace std;
struct s {
  int x, y;
};
s g(int a, int b) {
  s tem, temp;
  temp.x = 1;
  temp.y = 0;
  if (b == 0) return temp;
  temp = g(b, a % b);
  tem.x = temp.y;
  tem.y = temp.x - a / b * temp.y;
}
int gcd(int a, int b) {
  int t;
  while (b) {
    t = a % b;
    a = b;
    b = t;
  }
  return a;
}
int main() {
  int a, b, m;
  scanf("%d%d%d", &a, &b, &m);
  int x = (-1000000000) % m;
  x = (x + m) % m;
  int d = gcd(1000000000, m);
  int M = m;
  if (a < m) M = a;
  for (int i = 1; i <= M; i++)
    if ((long long)i * x % m > b) {
      printf("1 ");
      char ans[9];
      for (int j = 0; j < 9; j++) ans[j] = '0';
      int now = 8;
      while (i) {
        ans[now--] = i % 10 + '0';
        i /= 10;
      }
      for (int i = 0; i < 9; i++) printf("%c", ans[i]);
      return 0;
    }
  printf("2");
}
