#include <bits/stdc++.h>
using namespace std;
void __print(long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  long long f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
inline long long GCD(long long x, long long y) {
  long long r = x % y;
  while (r) {
    x = y;
    y = r;
    r = x % y;
  }
  return y;
}
const long long N = 1e6 + 69;
signed main() {
  long long a, b, m;
  cin >> a >> b >> m;
  for (long long i = 1; i <= min(a, m); i++) {
    long long var = (1e9 + 5) - 5;
    long long x = (var * i) % m;
    x = (m - x) % m;
    if (b < x) {
      ;
      string s = to_string(i);
      ;
      long long k = (long long)s.size();
      for (long long j = 0; j < 9 - k; j++) {
        s = "0" + s;
      }
      cout << 1 << " " << s << '\n';
      return 0;
    }
  }
  cout << 2 << '\n';
  return 0;
}
