#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"

using namespace std;

//constexpr long long int MOD = 1000000007;
//constexpr int MOD = 1000000007;
//constexpr int MOD = 998244353;
constexpr long long int MOD = 998244353;
constexpr double EPS = 1e-9;

//int N, M, K, H, W, L, R;
long long int N, M, K, H, W, L, R;

constexpr unsigned long long int ov = 2000000000000000000;

inline pair<unsigned long long int, unsigned long long int>div(unsigned long long int a, unsigned long long int b, unsigned long long int d) {
	if (b == 0) {
		return { 0,0 };
	}
	if (a >= d) {
		auto p = div(a%d, b, d);
		if (a / d <= ov / b) {
			p.first += a / d * b;
		}
		else {
			p.first = ov + 1;
		}
		if (p.first > ov) {
			p.first = ov + 1;
		}
		return p;
	}
	if (b % 2 == 0) {
		auto p = div(a * 2 % d, b / 2, d);
		if (a * 2 >= d) {
			p.first += b / 2;
		}
		if (p.first > ov) {
			p.first = ov + 1;
		}
		return p;
	}
	else {
		auto p = div(a * 2 % d, b / 2, d);
		if (a * 2 >= d)p.first += b / 2;
		p.first += a / d;
		p.second += a % d;
		if (p.second >= d) {
			p.second -= d;
			p.first++;
		}
		if (p.first > ov) {
			p.first = ov + 1;
		}
		return p;
	}
}

void add(pair<unsigned long long int, unsigned long long int>&a, pair<unsigned long long int, unsigned long long int>b, unsigned long long int &d) {
	a.first += b.first;
	a.second += b.second;
	if (a.second >= d) {
		a.second -= d;
		a.first++;
	}
	if (a.first > ov) {
		a.first = ov + 1;
	}
	return;
}

unsigned long long int bitnum(unsigned long long int r, unsigned long long int b) {
	unsigned long long int ret = 0;
	ret = r / (1LL << (b + 1));
	ret <<= b;
	unsigned long long int m = r % (1LL << (b + 1));
	if (m >= 1LL << b)ret += m - (1LL << b) + 1;
	return ret;
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	while (cin >> N, N) {
		vector<unsigned long long int>v(N);
		for (auto &i : v)cin >> i;
		bool none = false;
		for (int i = 60; i < N; i++) {
			if (v[i])none = true;
		}
		if (none) {
			cout << "None\n";
			continue;
		}
		vector<pair<unsigned long long int, unsigned long long int>>ans;
		for (unsigned long long int num = ((v[0] == 0) ? 1 : v[0] * 2 - 1); num <= v[0] * 2 + 1; num++) {
			unsigned long long int d = num;
			if (d % 2 == 0)d >>= 1;
			pair<unsigned long long int, unsigned long long int>box;
			for (int i = 0; i < N; i++) {
				add(box, div(1LL << i, v[i], d), d);
			}
			if (box.second)continue;
			if (box.first > ov)continue;
			unsigned long long int st, ed;
			if (num & 1) {
				st = box.first - num / 2;
				ed = box.first += num / 2;
			}
			else {
				st = (box.first - num + 1) / 2;
				ed = st + num - 1;
			}
			if (st <= 0 || ed > ov / 2)continue;
			vector<unsigned long long int>dnum(N);
			for (int i = 0; i < N; i++) {
				dnum[i] = bitnum(ed, i) - bitnum(st - 1, i);
			}
			if (dnum == v)ans.emplace_back( st,ed );
		}
		if (ans.size() == 0) {
			cout << "None\n";
		}
		else if (ans.size() == 1) {
			cout << ans[0].first << " " << ans[0].second << endl;
		}
		else {
			cout << "Many\n";
		}
	}
}



Measured memory_bytes: 3156