#include #include #include #include #include #include #include #include #include #include #include #include #include #define pye cout << "yes" << endl; #define pno cout << "no" << endl; #define pYe cout << "Yes" << endl; #define pNo cout << "No" << endl; #define pYE cout << "YES" << endl; #define pNO cout << "NO" << endl; #define prin(num) cout << num << endl; #define max(a, b) ((a)>(b) ? (a):(b)) #define min(a, b) ((a)<(b) ? (a):(b)) #define INF 100000000000 #define MOD 1000000007LL #define MAX_V 10005 #define MAX_E 30005 #define NIL -1 #define WHITE 0 #define BLACK 1 #define mp make_pair using namespace std; typedef long long ll; typedef pair P; typedef map Map; int main(void) { ll N, i; cin >> N; ll A[14]; ll dp[1<<14]={0}; ll msk; ll a, b; for(i=0; i> A[i]; } for(msk=0; msk<1<>a&1) && !(msk>>b&1)) { dp[msk || (1<