#include<bits/stdc++.h>
using namespace std;

const double eps=1e-7;

int sgn(double a){
    if (fabs(a)<eps) return 0;
    if (a<0) return -1;
    return 1;
}

int cmp(double a,double b){
    return sgn(a-b);
}

double sqr(double a) {return a*a;}

struct Point{
    Point(double _x=0,double _y=0):x(_x),y(_y){}
    
    void Read() {scanf("%lf%lf",&x,&y);}
    
    Point operator - () const {return Point(-x,-y);}
    Point operator + (Point p) const {return Point(x+p.x,y+p.y);}
    Point operator - (Point p) const {return Point(x-p.x,y-p.y);}
    Point operator * (double d) const {return Point(x*d,y*d);}
    Point operator / (double d) const {return Point(x/d,y/d);}
    
    double Length() const {return sqrt(x*x+y*y);}
    double SqrLength() const {return x*x+y*y;}
    
    bool operator == (const Point p) const {return cmp(x,p.x)==0 && cmp(y,p.y)==0;}
    bool operator < (const Point p) const {return cmp(x,p.x)<0 || (cmp(x,p.x)==0 && cmp(y,p.y)<0);}
    
    double x,y;
    
    friend double Distance(Point p1,Point p2) {return (p1-p2).Length();}
    friend Point Rotate90(Point p) {return Point(-p.y,p.x);}
    friend Point Normalize(Point p) {return p/p.Length();}
    friend double Cross(Point p1,Point p2) {return p1.x*p2.y-p1.y*p2.x;}
    friend int CrossOp(Point p1,Point p2) {return sgn(Cross(p1,p2));}
    friend int CrossOp(Point p1,Point p2,Point p3) {return sgn(Cross(p2-p1,p3-p1));}
    friend double Dot(Point p1,Point p2) {return p1.x*p2.x+p1.y*p2.y;}
};

struct Line{
    Line(){}
    Line(Point _s,Point _t):s(_s),t(_t){}
    Point s,t;
    
    friend bool PointOnLine(Line l,Point p){
        return CrossOp(p-l.s,l.t-l.s)==0;
    }
    friend Point GetLineProjectPoint(Line l,Point p){
        Point dir=l.t-l.s;
        return l.s+dir*(Dot(dir,p-l.s)/dir.SqrLength());
    }
    friend Point GetLineReflectPoint(Line l,Point p){
        Point q=GetLineProjectPoint(l,p);
        Point ret=q*2-p;
        return ret;
    }
};

bool SameLine(vector<Point> f){
    for(int i=2;i<f.size();i++){
        if (CrossOp(f[0]-f[i],f[1]-f[i])!=0){
            return false;
        }
    }
    return true;
}

int n;
vector<Point> f;
set<Point> s;

bool CheckSymmetry(Line l){    
    int cnt=0;
    for(int i=0;i<n;i++){
        if (PointOnLine(l,f[i])){
            cnt++;
        } else{
            Point p=f[i];
            Point q=GetLineReflectPoint(l,p);
            if (!s.count(q)) return false;
        }
    }
    if (cnt>2) return false;
    return true;
}

int main(){
    scanf("%d",&n);
    f.resize(n);
    for(int i=0;i<n;i++){
        f[i].Read();
        s.insert(f[i]);
    }
        
    if (SameLine(f)){
        puts("No");
        return 0;
    }
    
    bool ans=false;
    for(int i=1;i<n;i++){
        Point dir=Rotate90(f[i]-f[0]);
        Point midP=(f[i]+f[0])*0.5;
        Line l(midP,midP+dir);
        bool state=CheckSymmetry(l);
        ans = ans || state;
    }
    for(int i=2;i<n;i++){
        Point dir=Rotate90(f[i]-f[1]);
        Point midP=(f[i]+f[1])*0.5;
        Line l(midP,midP+dir);
        bool state=CheckSymmetry(l);
        ans = ans || state;
    }
    ans = ans || CheckSymmetry(Line(f[0],f[1]));    
    puts(ans?"Yes":"No");
    return 0;
}


Measured memory_bytes: 3312