#55335: c++


yp11451267@yphs.tp.edu.tw (705-43鄭丞博)


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

struct Point {
    long long x, y;
    
    // 定義排序規則:先比 X,再比 Y
    bool operator<(const Point& other) const {
        if (x != other.x) return x < other.x;
        return y < other.y;
    }
};

void solve() {
    int n;
    while (cin >> n && n != 0) {
        vector<Point> pts(n);
        for (int i = 0; i < n; ++i) {
            cin >> pts[i].x >> pts[i].y;
        }
        
        // 1. 將所有點排序
        sort(pts.begin(), pts.end());
        
        // 2. 最左下與最右上的點相加,定義出「兩倍的對稱中心」
        long long target_x = pts[0].x + pts[n - 1].x;
        long long target_y = pts[0].y + pts[n - 1].y;
        
        // 3. 使用雙指標向內檢查
        bool is_symmetric = true;
        int left = 0, right = n - 1;
        
        while (left <= right) {
            if (pts[left].x + pts[right].x != target_x || 
                pts[left].y + pts[right].y != target_y) {
                is_symmetric = false;
                break;
            }
            left++;
            right--;
        }
        
        // 4. 輸出結果
        if (is_symmetric) {
            cout << "yes\n";
        } else {
            cout << "no\n";
        }
    }
}

int main() {
    // 最佳化輸入輸出
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    
    solve();
    
    return 0;
}