#include<bits/stdc++.h>

using namespace std;
using ll = long long;
using pint = pair<int,int>;
using p = complex<double>;

void f(vector<p>& B) {
	int N = B.size();
	double x = 0, y = 0;
	for(auto u : B)x += u.real(), y += u.imag();
	x /= N, y /= N;

	for(auto&u : B) {
		u = {u.real() - x, u.imag() - y};
	}
	sort(B.begin(), B.end(), [&](p a, p b){return (a.real() == b.real() ? a.imag() < b.imag() : a.real() < b.real()) ;});
}

void g(vector<p>& B, double b) {
	for(auto &i : B) {
		i *= p{cos(b), sin(b)};
	}
	sort(B.begin(), B.end(), [&](p a, p b){return (a.real() == b.real() ? a.imag() < b.imag() : a.real() < b.real()) ;});
}

// #include"debug.hpp"

int main()
{
	std::random_device seed_gen;
	std::default_random_engine engine(seed_gen());
	std::uniform_real_distribution<> dist(0.0, 2 * acos(-1));
	int N; cin >> N;
	vector<p> A(N), B(N);
	for(auto &u : A) {
		double a, b; cin >> a >> b;
		u = {a, b};
	}
	for(auto &u : B) {
		double a, b; cin >> a >> b;
		u = {a, b};
	}



	f(A);
	f(B);

	// print(A);

	// print(B);
	const double eps = 1e-2;

	for(int i = 0; i < 100000; i++) {
		g(B, dist(engine));

		bool ok = true;
		for(int i = 0; i < N; i++) {
			auto v = A[i] - B[i];
			if(abs(v) > eps) {
				ok = false;
			}
		}

		if(ok) {
			cout << "Yes" << endl;
			return 0;
		}
	}

	cout << "No" << endl;


}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define MOD int(1e9+7)
#define INF int(1e9)
#define LINF ll(1e18)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define P pair<ll,ll>

int n,t,half1,half2;
ll a[45];
ll f[1<<21];

ll nibutan(ll former){
  ll latter=t-former;
  int ok=0; int ng=(1<<half1);
  while(ng-ok>1){
    int mid=(ok+ng)/2;
    if(f[mid]<=latter) ok=mid;
    else ng=mid;
  }
  return former+f[ok];
}

int main(){
  cin>>n>>t;
  rep(i,n) cin>>a[i];
  half1=n/2,half2=(n+1)/2;
  rep(i,1<<half1){
    ll res=0;
    rep(j,half1){
      if(i>>j & 1) res+=a[j];
    }
    f[i]=res;
  }
  sort(f,f+(1<<(half1)));
  ll ans=0;
  rep(i,1<<half2){
    ll res=0;
    rep(j,half2){
      if(i>>j & 1) res+=a[j+half1];
    }
    if(res>t) continue;
    res = nibutan(res);
    ans=max(ans,res);
  }
  cout<<ans<<endl;
}