#include using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); ll N, A; cin >> N; vector> vec(N); vector> base; for (int i=0; i> A; vec[i] = {A, (i<=60 ? (1LL< ans; for (int j=0; j<=60; j++){ if (vec[i].second & (1LL<