#include <bits/stdc++.h>
using namespace std;
int MDA[10000010];
int MDB[10000010];
int main() {
  long long a, b, m;
  int i;
  cin >> a >> b >> m;
  for (i = 0; i < (min(m, a + 1)); i++) {
    MDA[i] = (i * 1000000000) % m;
  }
  for (i = 0; i < (min(m, b + 1)); i++) {
    MDB[(i) % m] = 1;
  }
  int ans = 2, mov;
  for (i = 0; i < (min(m, a + 1)); i++) {
    if (MDB[(m - MDA[i]) % m] == 0) {
      ans = 1;
      mov = i;
      break;
    }
  }
  cout << ans;
  if (ans == 1) {
    cout << " ";
    char str[100];
    sprintf(str, "%ld", mov);
    string s = str;
    while (s.size() != 9) s = "0" + s;
    cout << s;
  }
  cout << endl;
  return 0;
}
