#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; vector arr(n); for(auto &x: arr) cin >> x; int left = 0, right = n-1; bool is_krick = true; int target_sum = arr[left] + arr[right]; while(left <= right) { if((arr[left] + arr[right]) != target_sum) { is_krick = false; break; } left++; right--; } if (is_krick) cout << "Yes" << endl; else cout << "No" << endl; return 0; }