#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
  long long int n=0;
  cin >> n;
  long long int ans=0;
  int i=0;
  int amari=0;
  vector<int>dog;
  while(n>0){
    if(n%26 == 0){
      amari=n%26;
      dog.push_back(amari);
      n/=26;
      n--;
      continue;
    }
    amari=n%26;
    dog.push_back(amari);
    n/=26;
  }
  reverse(begin(dog),end(dog));
  for(int i=0;i<(dog.size());i++){
    char c;
    if(dog.at(i) == 0){
      cout << "z";
      continue;
    }
    c = dog.at(i)+96;
    cout << c;
  }
  cout << endl;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int MOD = 1000000007;
const long long INF = 1LL << 60;
using Graph = vector<vector<ll>>;

int main()
{
    string s;
    cin >> s;
    ll n = s.length();

    //2文字条件
    for (int i = 0; i < n - 1; i++)
    {
        if (s[i] == s[i + 1])
        {
            cout << i + 1 << " " << i + 2 << endl;
            return 0;
        }
    }

    //3文字条件
    for (int i = 0; i < n - 2; i++)
    {
        if (s[i] == s[i + 2])
        {
            cout << i + 1 << " " << i + 3 << endl;
            return 0;
        }
    }

    cout << -1 << " " << -1 << endl;
}
