#include <bits/stdc++.h>
using namespace std;
void ASS(bool bb) {
  if (!bb) {
    ++*(int*)0;
  }
}
#pragma comment(linker, "/STACK:106777216")
int main() {
  int a, b, m;
  cin >> a >> b >> m;
  for (int i = 0; i < (int)(min(a + 1, m)); i++) {
    int x = i * (long long)1000000000 % m;
    x = (m - x) % m;
    if (x > b) {
      printf("1 %09d\n", i);
      return 0;
    }
  }
  cout << 2 << endl;
  return 0;
}
