#include<bits/stdc++.h>
#define f first
#define s second
#define mp make_pair
#define pi M_PI
#define inf 1<<30
#define eps (1e-11)
#define equals(a,b) (fabs((a)-(b))<eps)
using namespace std;

class Point{
public:
  double x,y;
  Point(double x=0,double y=0):x(x),y(y){}

  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 k){ return Point(x*k,y*k);}
  Point operator/(double k){ return Point(x/k,y/k);}
  bool operator<(Point p)const{ return (x!=p.x ? x<p.x : y<p.y);}
  bool operator==(Point p)const{ return fabs(x-p.x)<eps && fabs(y-p.y)<eps;}

  double abs(){ return sqrt(norm());}
  double norm(){ return (x*x+y*y);}
};
typedef Point Vector;
typedef vector<Point> Polygon;

class Segment{
public:
  Point p1,p2;
  Segment(Point p1=Point(),Point p2=Point()):p1(p1),p2(p2){}
};
typedef Segment Line;

double norm(Vector a){ return (a.x*a.x+a.y*a.y);}
double abs(Vector a){ return sqrt(norm(a));}
double dot(Vector a,Vector b){ return (a.x*b.x+a.y*b.y);}
double cross(Vector a,Vector b){ return (a.x*b.y-a.y*b.x);}

Point project(Segment s,Point p){
  Vector base=(s.p2-s.p1);
  double r=(dot(p-s.p1,base)/base.norm());
  return (s.p1+base*r);
}

Point reflect(Segment s,Point p){
  return p+(project(s,p)-p)*2.0;
}

static const int COUNTER_CLOCKWISE=1;
static const int CLOCKWISE=-1;
static const int ONLINE_BACK=2;
static const int ONLINE_FRONT=-2;
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;
}

Line getPerpendicularBisector(Point a,Point b){
  Point m=b+((a-b)/2.0);
  Vector v1=(m-a),v2=(m-b);
  swap(v1.x,v1.y);
  v1.y=(-1.0)*v1.y;
  swap(v2.x,v2.y);
  v2.y=(-1.0)*v2.y;
  return Line(m+v1,m+v2);
}

Polygon convex_hull(Polygon s){
  Polygon g;
  int n=s.size();
  if(n<3)return s;

  sort(s.begin(),s.end());

  for(int i=0;i<n;i++){
    for(int n=g.size();n>=2 && ccw(g[n-2],g[n-1],s[i])==1;n--){
      g.pop_back();
    }
    g.push_back(s[i]);
  }
  for(int i=n-2;i>=0;i--){
    for(int n=g.size();n>=2 && ccw(g[n-2],g[n-1],s[i])==1;n--){
      g.pop_back();
    }
    g.push_back(s[i]);
  }
  reverse(g.begin(),g.end());
  g.pop_back();
  return g;
}

int n;
vector<Point> vp;
Polygon p;

bool check(Line L){
  int count=0;
  vector<Point> vpp;
  for(int i=0;i<vp.size();i++){
    int c=ccw(L.p1,L.p2,vp[i]);
    if(c==2 || c==-2 || c==0)count++;
    if(count==3)return false;
    vpp.push_back(reflect(L,vp[i]));
  }
  sort(vpp.begin(),vpp.end());
  if(vpp!=vp)return false;
  return true;
}

int main()
{
  int x,y;

  cin>>n;
  for(int i=0;i<n;i++){
    cin>>x>>y;
    vp.push_back(Point(x,y));
  }
  sort(vp.begin(),vp.end());
  p=convex_hull(vp);

  string ans="No";
  int s=p.size();
  if(s<=vp.size()){
    for(int i=0;i<s;i++){
      Line L = getPerpendicularBisector(p[i],p[(i+1)%s]);
      if(check(L))ans="Yes";
      if(s%2==0){
	L=Line(p[i],p[(i+s/2)%s]);
	if(check(L))ans="Yes";
      }
    }
  }
  cout<<ans<<endl;
  return 0;
}

Measured memory_bytes: 1300