#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ull a, b, x;
  cin >> a >> b >> x;
  ull l = 0, r = 1e9;
  ull ans = 0;
  for (; (r - l) > 1;) {
    ull num = 0;
    ull v = (l + r) / 2;
    for (ull i = v; i > 0; i /= 10) ++num;
    if ((a * v + b * num) > x)
      r = v;
    else
      l = v;
    ans = l;
  }
  cout << l << ' ' << r << endl;
  cout << ans;
}
