#include "testlib.h"
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main(int argc, char* argv[]) {
  registerGen(argc, argv, 1);
  ll lim = 1e12;
  while (true) {
    vector <ll> f(100);
    f[0] = 1;
    f[1] = 1;
    for (int i = 2; i < 100; i++) {
      f[i] = f[i - 1] + f[i - 2];
    }
    vector <ll> q;
    for (int i = 0; i < 100; i++) {
      if (f[i] <= lim) {
        q.push_back(f[i]);
      } else {
        break;
      }
    }
    ll sum = 0;
    ll xr = 0;
    for (ll x : q) {
      int coef = (rnd.next(0, 2));
      if (sum + coef * x <= lim) {
        if (coef % 2) xr ^= x;
        sum += coef * x;
      }
    }
    cout << xr << ' ' << sum << '\n';
    break;
  }
}
