#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e7 + 100;
const int INF = 0x3FFFFFFF;
bool vis[MAXN];
int main() {
  long long a, b, m;
  cin >> a >> b >> m;
  for (int i = 1; i <= a; i++) {
    long long t = 1e9;
    long long mod = i * t % m;
    if (vis[mod]) break;
    vis[mod] = 1;
    if (b + mod < m && mod) {
      cout << "1 ";
      int cnt = 0;
      int temp = i;
      while (i) {
        i /= 10;
        cnt++;
      }
      for (int j = 1; j <= 9 - cnt; j++) cout << 0;
      cout << temp << endl;
      return 0;
    }
  }
  cout << 2 << endl;
  return 0;
}
