#include <bits/stdc++.h>
using namespace std;
const int nmax = 100009;
long long a, b, mod;
const long long up = 1000000000;
int n;
int mat[5009][5009];
int col[5009];
int h[5009];
stack<int> s;
void dfs(int v, int l) {
  if (h[v] != 0) {
    if (l - h[v] == 3) {
      int c = s.top();
      s.pop();
      int b = s.top();
      s.pop();
      int a = s.top();
      s.pop();
      cout << a << " " << b << " " << c << endl;
      exit(0);
    }
    return;
  }
  s.push(v);
  h[v] = l;
  for (int i = 1; i <= n; i++) {
    if (col[i] == 0 && mat[v][i] == 1 && (h[i] == 0 || l + 1 - h[i] == 3))
      dfs(i, l + 1);
  }
  col[v] = 1;
  s.pop();
}
int pp[5009];
int main() {
  cin >> a >> b >> mod;
  for (long long i = 0; i <= min(mod, a); i++) {
    long long tmp = (i * up) % mod;
    if (tmp != 0 && mod - tmp > b) {
      printf("1 %09I64d\n", i);
      return 0;
    }
  }
  cout << 2 << endl;
  return 0;
}
