#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, k, b, t;
  cin >> k >> b >> n >> t;
  long long int temp = 1, temp1 = t, u = 1;
  int i, time = 0;
  for (int i = 1; i <= n; i++) {
    temp = u * k + b;
    u = temp;
  }
  cout << temp << endl;
  while (temp1 < temp) {
    temp1 = t * k + b;
    t = temp1;
    time++;
  }
  cout << time << endl;
}
