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

template<class T = int>
struct rational{
	T gcd(T a,T b){ return b ? gcd(b,a % b) : a; }
	T numer,denom;

	rational() : numer(0),denom(1){}
	rational(T n,T d = 1) : numer(n),denom(d){
		normalize();
	}

	void normalize(){
		if(denom == 0){
			numer = 1;
			return;
		}
		if(denom < 0) numer *= -1,denom *= -1;
		T g = gcd(numer < 0 ? -numer : numer,denom);
		if(g == 0) numer = 0,denom = 1;
		else numer /= g,denom /= g;
	}

	operator long long() const{ return (long long)(numer / denom); }

	rational operator-() const{ return rational(*this) *= -1; }

	rational operator+(const rational &x) const{ return rational(*this) += x; }
	rational operator-(const rational &x) const{ return rational(*this) -= x; }
	rational operator*(const rational &x) const{ return rational(*this) *= x; }
	rational operator/(const rational &x) const{ return rational(*this) /= x; }

	rational &operator+=(const rational &x){
		numer = numer * x.denom + x.numer * denom;
		denom *= x.denom;
		normalize();
		return *this;
	}
	rational &operator-=(const rational &x){
		numer = numer * x.denom - x.numer * denom;
		denom *= x.denom;
		normalize();
		return *this;
	}
	rational &operator*=(const rational &x){
		numer *= x.numer;
		denom *= x.denom;
		normalize();
		return *this;
	}
	rational &operator/=(const rational &x){
		numer *= x.denom;
		denom *= x.numer;
		normalize();
		return *this;
	}

	friend ostream &operator<<(ostream &os,const rational &x){
		return os << x.numer << '/' << x.denom;
	}

	bool operator<(const rational &x) const{ return numer * x.denom < x.numer * denom; };
	bool operator>(const rational &x) const{ return numer * x.denom > x.numer * denom; };
	bool operator<=(const rational &x) const{ return numer * x.denom <= x.numer * denom; };
	bool operator>=(const rational &x) const{ return numer * x.denom >= x.numer * denom; };
	bool operator==(const rational &x) const{ return numer * x.denom == x.numer * denom; };
	bool operator!=(const rational &x) const{ return numer * x.denom != x.numer * denom; };
};

template<class T>
struct Complex{
	T x,y;

	Complex() : x(T(0)),y(T(0)){}
	Complex(T x,T y) : x(x),y(y){}

	T real() const{ return x; }
	T imag() const{ return y; }

	Complex operator-() const{ return Complex(*this) *= -1; }

	Complex operator+(const Complex &x) const{ return Complex(*this) += x; }
	Complex operator-(const Complex &x) const{ return Complex(*this) -= x; }
	Complex operator*(const T &x) const{ return Complex(*this) *= x; }
	Complex operator/(const T &x) const{ return Complex(*this) /= x; }

	Complex &operator+=(const Complex &p){
		x += p.x; y += p.y;
		return *this;
	}
	Complex &operator-=(const Complex &p){
		x -= p.x; y -= p.y;
		return *this;
	}
	Complex &operator*=(const T &a){
		x *= a; y *= a;
		return *this;
	}
	Complex &operator/=(const T &a){
		x /= a; y /= a;
		return *this;
	}

	friend ostream &operator<<(ostream &os,const Complex &p){
		return os << '(' << p.x << ',' << p.y << ')';
	}

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

using Float = rational<int>;
using Point = Complex<Float>;
struct Line{
	Point a,b;
	Line(Point a,Point b) : a(a),b(b){}
};

Line bisector(Point p1,Point p2){
	Point mid = (p1 + p2) / Float(2),d = p2 - p1;
	return Line(mid,mid + Point(d.imag(),-d.real()));
}

tuple<Float,Float,Float> linear_form(const Line &l){
	if(l.a.real() == l.b.real()) return make_tuple(1,0,-l.a.real());
	Float a = (l.b.imag() - l.a.imag()) / (l.b.real() - l.a.real());
	Float b = l.a.imag() - a * l.a.real();
	return make_tuple(a,-1,b);
}

template<class T>
ostream &operator<<(ostream &os,const vector<T> &v){
	for(int i = 0;i < v.size();i++) os << (i ? "," : "[") << v[i];
	os << "]";
	return os;
}

template<class T>
ostream &operator<<(ostream &os,const tuple<T,T,T> &v){
	os << '(' << get<0>(v) << ',' << get<1>(v) << ',' << get<2>(v) << ')';
	return os;
}

signed main(){
	int n;
	Point ps[1010];
	cin >> n;
	for(int i = 0;i < n;i++){
		int a,b;
		cin >> a >> b;
		ps[i] = Point(Float(a),Float(b));
	}
	bool oneline = true;
	auto l = linear_form(Line(ps[0],ps[1]));
	for(int i = 0;i < n;i++){
		Float a,b,c;
		tie(a,b,c) = l;
		if(a * ps[i].real() + b * ps[i].imag() != -c) oneline = false;
	}
	if(oneline){
		cout << "No" << endl;
		return 0;
	}
	map<tuple<Float,Float,Float>,vector<int>> cnt;
	for(int i = 0;i < n;i++){
		for(int j = i + 1;j < n;j++){
			auto t = linear_form(bisector(ps[i],ps[j]));
			cnt[t].push_back(i);
			cnt[t].push_back(j);
		}
	}
	for(auto p : cnt){
		//cout << p.first << " " << p.second << endl;
		if(n - p.second.size() <= 2){
			Float a,b,c;
			tie(a,b,c) = p.first;
			bool flag = true;
			set<int> st;
			for(int i = 0;i < n;i++) st.insert(i);
			for(int v : p.second) st.erase(v);
			for(int v : st){
				if(a * ps[v].real() + b * ps[v].imag() != -c) flag = false; 
			}
			if(flag){
				cout << "Yes" << endl;
				return 0;
			}
		}
	}
	cout << "No" << endl;
}


Measured memory_bytes: 73448