#include using namespace std; using Graph = vector>; #define rep(i,n) for(int i=0; i<(n); i++) #define INF ((1LL<<62)-(1LL<<31)) #define all(a) (a).begin(),(a).end() #define rall(a) (a).rbegin(),(a).rend() typedef long long ll; typedef pair pl; typedef tuple tupl; int main() { int n; cin >> n; vector e(n); ll sum=0; rep(i,n) { cin >> e[i]; sum+=e[i]; } bool flag=false; if(sum%3==0) { for(int bit1=0;bit1<(1< v; rep(i,n) if(1<