#include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 99999999999999999
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;



typedef pair<int,int> P;

struct Point{
    Point(double arg_x,double arg_y){
        x = arg_x;
        y = arg_y;
    }

    Point(){
        x = y = 0.0;
    }

    Point operator + (Point p){ return Point(x+p.x,y+p.y); }
    Point operator - (Point p){ return Point(x-p.x,y-p.y);}
    Point operator * (double a){ return Point(a*x,a*y); }
    Point operator / (double a){ return Point(x/a,y/a); }

    double abs(){ return sqrt(norm()); }
    double norm(){ return x*x + y*y; }

    bool operator<(const Point &p) const{
        return x != p.x? x < p.x: y < p.y;
    }

    bool operator == (const Point &p) const{
        return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS;
    }

    double x,y;
};

typedef Point Vector;
typedef vector<Point> Polygon;

struct Line{
    Line(){

    }
    Line(Point a,Point b){
        p[0] = a;
        p[1] = b;
    }
    Point p[2];
};

set<P> SET;
vector<Point> points;

double calc_slope(Line A){

    if(fabs(A.p[0].x-A.p[1].x) < EPS){

        return DBL_MAX;

    }else if(fabs(A.p[0].y-A.p[1].y) < EPS){

        return 0;

    }else{

        return (A.p[0].y-A.p[1].y)/(A.p[0].x-A.p[1].x);
    }
}

double norm(Vector a){
    return a.x*a.x+a.y*a.y;
}

double abs(Vector a){
    return sqrt(norm(a));
}

double cross(Vector a,Vector b){
    return a.x*b.y-a.y*b.x;
}

double dot(Vector a,Vector b){
    return a.x*b.x + a.y*b.y;
}

static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONLINE_BACK = 2;
static const int ONLINE_FRONT = -1;
static const int ON_SEGMENT = 0;

int ccw(Point p0,Point p1,Point p2){

    Vector a = p1 - p0;
    Vector b = p2 - p0;

    if(cross(a,b) > EPS)return COUNTER_CLOCKWISE;
    if(cross(a,b) < -EPS)return CLOCKWISE;
    if(dot(a,b) < -EPS)return ONLINE_BACK;
    if(a.norm() < b.norm())return ONLINE_FRONT;

    return ON_SEGMENT;
}

Point calc_Reflection_Point(double x1,double y1,double x2,double y2,double xp,double yp){

    Point ret;

    bool X_FLG = false,Y_FLG = false;
    double slope;

    if(y1 == y2){
        X_FLG = true;
    }else if(x1 == x2){
        Y_FLG = true;
    }else{
        slope = (y2-y1)/(x2-x1);
    }

    if(X_FLG){
        ret.x = xp,ret.y=y1;
    }else if(Y_FLG){
        ret.x = x1,ret.y = yp;
    }else{
        ret.x = (yp*(x2-x1)*(y2-y1)+xp*(x2-x1)*(x2-x1)-y1*(y2-y1)*(x2-x1)+x1*(y2-y1)*(y2-y1))/((y2-y1)*(y2-y1)+(x2-x1)*(x2-x1));
        ret.y = ((x1-x2)*ret.x+yp*(y2-y1)+xp*(x2-x1))/(y2-y1);
    }
    ret.x = 2*ret.x-xp;
    ret.y = 2*ret.y-yp;

    return ret;
}

Point calc_minus(Point a,Point b){
    Point ret;

    ret.x = a.x-b.x;
    ret.y = a.y-b.y;

    return ret;
}

double calc_len(Vector a){
    return sqrt(a.x*a.x+a.y*a.y);
}

//★★線分ではなく直線と点の距離★★
double getDistanceLP(Line l,Point p){
    return fabs(cross(calc_minus(l.p[1],l.p[0]),calc_minus(p,l.p[0]))/calc_len(calc_minus(l.p[1],l.p[0])));
}

Point calc_Reflection_Point(Line line,Point point){

    if(getDistanceLP(line,point) < EPS){

        return point;
    }

    return calc_Reflection_Point(line.p[0].x,line.p[0].y,line.p[1].x,line.p[1].y,point.x,point.y);
}

Polygon ConvexHull_ALL(Polygon polygon) {

    int N = polygon.size();

    Polygon ret(2*N);
    sort(polygon.begin(),polygon.end());

    int a = 0;
    for (int i = 0; i < N; ++i) {
        if (a >= 2) {
            while (cross(ret[a-1]-ret[a-2],polygon[i]-ret[a-2]) < -EPS){
                a--;
                if(a < 2){
                    break;
                }
            }
        }
        ret[a] = polygon[i];
        a++;
    }

    int b = a+1;
    for (int i = N-2; i >= 0; --i) {
        if (a >= b) {
            while (cross(ret[a-1]-ret[a-2],polygon[i]-ret[a-2]) < -EPS) {
                a--;
                if(a < b){
                    break;
                }
            }
        }
        ret[a] = polygon[i];
        a++;
    }

    ret.resize(a-1);

    return ret;
}

int main(){

    int N;
    scanf("%d",&N);

    Polygon polygon;

    int X,Y;

    for(int i = 0; i < N; i++){

        scanf("%d %d",&X,&Y);

        SET.insert(make_pair(X,Y));
        polygon.push_back(Point(X,Y));
    }

    bool FLG = false;

    for(int i = 2; i < N; i++){
        if(abs(cross(polygon[0]-polygon[i],polygon[1]-polygon[i])) > EPS){

            FLG = true;
            break;
        }
    }

    if(!FLG){

        printf("No\n");
        return 0;
    }

    polygon = ConvexHull_ALL(polygon);
    int num_points = polygon.size();

    for(int i = 0; i < num_points; i++){

        points.push_back(polygon[i]);
        points.push_back(Point((polygon[i].x+polygon[(i+1)%num_points].x)/2,(polygon[i].y+polygon[(i+1)%num_points].y)/2));
    }

    for(int i = 0; i < num_points; i++){

        Line tmp_line = Line(points[i],points[i+num_points]);

        FLG = true;
        int num_on_line = 0;

        for(auto p: SET){

            Point tmp = calc_Reflection_Point(tmp_line,Point(p.first,p.second));

            X = round(tmp.x);
            Y = round(tmp.y);

            if(fabs(tmp.x-X) > EPS || fabs(tmp.y-Y) > EPS){

            	FLG = false;
            	break;
            }

            if(SET.count(make_pair(X,Y)) == 0){

                FLG = false;
                break;
            }

            if(make_pair(X,Y) == p){

                num_on_line++;
            }
        }

        if(FLG == true && num_on_line <= 2){

            printf("Yes\n");
            return 0;
        }
    }

    printf("No\n");

    return 0;
}



Measured memory_bytes: 3392