#include <bits/stdc++.h>
#define Rep(i,n,m) for(int i=(int)(n);i<(int)(m);i++)
#define rep(i,n) Rep(i,0,n)
#define all(v) v.begin(),v.end()
using namespace std;
using ll=long long;
using vi=vector<int>;
using vll=vector<ll>;
#define _GLIBCXX_DEBUG
const double e=0.000001;
const double pi=M_PI;
struct Point{
  double x,y;
  Point(){}
  Point(double a,double b){
    x=a;y=b;
  }
};
const Point O={0,0};
Point operator-(Point a,Point b){
  Point ret;
  ret.x=a.x-b.x;
  ret.y=a.y-b.y;
  return ret;
};
Point operator+(Point a,Point b){
  Point ret;
  ret.x=a.x+b.x;
  ret.y=a.y+b.y;
  return ret;
};
void operator+=(Point &a,Point b){a=a+b;};
void operator-=(Point &a,Point b){a=a-b;};
double dis(Point p,Point q){
  double d2=(p.x-q.x)*(p.x-q.x)+(p.y-q.y)*(p.y-q.y);
  return sqrt(d2);
};
double abs(Point p){
  return dis(p,O);
};
double rtod(double r){
  r/=pi;r*=180;
  return r;
};
double dtor(double d){
  d/=180.0;
  d*=pi;
  return d;
};
double rad(Point p){
  return atan2(p.y,p.x);
};
double dmod(double d){
  int k;
  if(d<0){
    k=(int)(d/180);k--;
  }
  else{
    k=ceil(d/180);
  }
  k/=2;
  return d-k*360;
};
Point rotate(double t,Point p,Point cons){
  p-=cons;
  double r=abs(p);
  double th=t+rad(p);
  Point ret;
  ret.x=r*cos(th);ret.y=r*sin(th);
  return ret+cons;
};
bool s(Point a,Point b){
  if(abs(b.x-a.x)<e) return a.y<b.y;
  return a.x<b.x;
};
bool same(Point a,Point b){
  if(abs(a.x-b.x)<e&&abs(a.y-b.y)<e) return true;
  else return false;
}
int main(){
  int N;cin>>N;
  vector<Point> a(N),b(N);
  rep(i,N){
    double x,y;cin>>x>>y;
    a[i].x=x;a[i].y=y;
  }
  rep(i,N){
    double x,y;cin>>x>>y;
    b[i].x=x;b[i].y=y;
  }
  sort(all(a),s);
  sort(all(b),s);
  if(N<2) cout << "Yes" << endl;
  else{
    bool test=false;
    rep(i,N){
      rep(j,N){
        if(i==j) continue;
        Point q=b[0]-a[i];
        double t2=rad(b[1]-b[0]);
        double t1=rad(a[j]-a[i]);
        vector<Point> c(N);
        rep(k,N){
          c[k]=rotate(t2-t1,a[k]+q,b[0]);
        }
        sort(all(c),s);
        bool tes=true;
        rep(k,N){
          if(same(b[k],c[k])) continue;
          tes=false;
        }
        if(tes) test=true;

      }
    }
    if(test) cout << "Yes" << endl;
    else cout << "No" << endl;
  }
  return 0;
}
#include <bits/stdc++.h>
#define rep3(i, s, n, a) for (int i = (s); i < (int)(n); i += a)
#define rep2(i, s, n) rep3(i, s, n, 1)
#define rep(i, n) rep2(i, 0, n)

using namespace std;
using ll = long long;
using ull = unsigned long long;
using P = pair<int, int>;

int main() { 
    ll n, k;
    cin >> n >> k;
    ll res = 0;
    for(ll x=2; x<=2*n;x++){
        if((x-k < 2) || (2*n < x - k)) continue;
        res += (x-1 - 2LL*max((x-n-1), 0LL)) * ((x-k-1) - 2LL*max(x-k-1-n, 0LL));
    }
    cout << res << endl;
    return 0; 
}