#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ll long long
#define ull unsigned long long
#define ld long double
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vll vector<ll>
#define vc vector<char>
#define vs vector<string>
#define vpll vector<pll>
#define vpii vector<pii>
#define umap unordered_map
#define uset unordered_set
#define PQ priority_queue
#define printa(a,L,R) for(int i=L;i<R;i++) cout<<a[i]<<(i==R-1?'\n':' ')
#define printv(a) printa(a,0,a.size())
#define print2d(a,r,c) for(int i=0;i<r;i++) for(int j=0;j<c;j++) cout<<a[i][j]<<(j==c-1?'\n':' ')
#define pb push_back
#define eb emplace_back
#define mt make_tuple
#define fbo find_by_order
#define ook order_of_key
#define MP make_pair
#define UB upper_bound
#define LB lower_bound
#define SQ(x) ((x)*(x))
#define issq(x) (((ll)(sqrt((x))))*((ll)(sqrt((x))))==(x))
#define F first
#define S second
#define mem(a,x) memset(a,x,sizeof(a))
#define inf 1e18
#define E 2.71828182845904523536
#define gamma 0.5772156649
#define nl "\n"
#define lg(r,n) (int)(log2(n)/log2(r))
#define pf printf
#define sf scanf
#define sf1(a) scanf("%d",&a)
#define sf2(a,b) scanf("%d %d",&a,&b)
#define sf3(a,b,c) scanf("%d %d %d",&a,&b,&c)
#define pf1(a) printf("%d\n",a);
#define pf2(a,b) printf("%d %d\n",a,b)
#define pf3(a,b,c) printf("%d %d %d\n",a,b,c)
#define sf1ll(a) scanf("%lld",&a)
#define sf2ll(a,b) scanf("%I64d %I64d",&a,&b)
#define sf3ll(a,b,c) scanf("%I64d %I64d %I64d",&a,&b,&c)
#define pf1ll(a) printf("%lld\n",a);
#define pf2ll(a,b) printf("%I64d %I64d\n",a,b)
#define pf3ll(a,b,c) printf("%I64d %I64d %I64d\n",a,b,c)
#define _ccase printf("Case %lld: ",++cs)
#define _case cout<<"Case "<<++cs<<": "
#define by(x) [](const auto& a, const auto& b) { return a.x < b.x; }
#define asche cerr<<"Ekhane asche\n";
#define rev(v) reverse(v.begin(),v.end())
#define srt(v) sort(v.begin(),v.end())
#define grtsrt(v) sort(v.begin(),v.end(),greater<ll>())
#define all(v) v.begin(),v.end()
#define mnv(v) *min_element(v.begin(),v.end())
#define mxv(v) *max_element(v.begin(),v.end())
#define toint(a) atoi(a.c_str())
#define BeatMeScanf ios_base::sync_with_stdio(false)
#define valid(tx,ty) (tx>=0&&tx<n&&ty>=0&&ty<m)
#define one(x) __builtin_popcount(x)
#define Unique(v) v.erase(unique(all(v)),v.end())
#define stree l=(n<<1),r=l+1,mid=b+(e-b)/2
#define fout(x) fixed<<setprecision(x)
string tostr(int n) {stringstream rr;rr<<n;return rr.str();}
inline void yes(){cout<<"YES\n";exit(0);}
inline void no(){cout<<"NO\n";exit(0);}
template <typename T> using o_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
//ll dx[]={1,0,-1,0,1,-1,-1,1};
//ll dy[]={0,1,0,-1,1,1,-1,-1};
//random_device rd;
//mt19937 random(rd());
#define debug(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); deb(_it, args); }
void deb(istream_iterator<string> it) {}
template<typename T, typename... Args>
void deb(istream_iterator<string> it, T a, Args... args) {
cerr << *it << " = " << a << endl;
deb(++it, args...);
}
const int mod=1e9+7;
const int N=55;
const ld eps=1e-9;
const ld PI=acos(-1.0);
//ll gcd(ll a,ll b){while(b){ll x=a%b;a=b;b=x;}return a;}
//ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
//ll qpow(ll n,ll k) {ll ans=1;assert(k>=0);n%=mod;while(k>0){if(k&1) ans=(ans*n)%mod;n=(n*n)%mod;k>>=1;}return ans%mod;}
int n,k,a[N],b[N],dp[N][510][510];
bool yo(int i,int p,int f)
{
if(i==n+1){
if(p==0&&f==0) return 0;
if(p/f==k) return 1;
return 0;
}
int &ret=dp[i][p][f];
if(ret!=-1) return ret;
return yo(i+1,p,f)|yo(i+1,p+a[i],f+b[i]);
}
int main()
{
BeatMeScanf;
int i,j,m;
cin>>n>>k;
for(i=1;i<=n;i++) cin>>a[i]>>b[i];
mem(dp,-1);
if(yo(1,0,0)) yes();
no();
return 0;
}
I3ByYWdtYSBjb21tZW50KGxpbmtlciwgIi9zdGFjazoyMDAwMDAwMDAiKQojcHJhZ21hIEdDQyBvcHRpbWl6ZSgiT2Zhc3QiKQojcHJhZ21hIEdDQyB0YXJnZXQoInNzZSxzc2UyLHNzZTMsc3NzZTMsc3NlNCxwb3BjbnQsYWJtLG1teCxhdngsdHVuZT1uYXRpdmUiKQojcHJhZ21hIEdDQyBvcHRpbWl6ZSgidW5yb2xsLWxvb3BzIikKCiNpbmNsdWRlPGJpdHMvc3RkYysrLmg+CiNpbmNsdWRlPGV4dC9wYl9kcy9hc3NvY19jb250YWluZXIuaHBwPgojaW5jbHVkZTxleHQvcGJfZHMvdHJlZV9wb2xpY3kuaHBwPgp1c2luZyBuYW1lc3BhY2UgX19nbnVfcGJkczsKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCiNkZWZpbmUgbGwgbG9uZyBsb25nCiNkZWZpbmUgdWxsIHVuc2lnbmVkIGxvbmcgbG9uZwojZGVmaW5lIGxkIGxvbmcgZG91YmxlCiNkZWZpbmUgcGlpIHBhaXI8aW50LGludD4KI2RlZmluZSBwbGwgcGFpcjxsbCxsbD4KI2RlZmluZSB2aSB2ZWN0b3I8aW50PgojZGVmaW5lIHZsbCB2ZWN0b3I8bGw+CiNkZWZpbmUgdmMgdmVjdG9yPGNoYXI+CiNkZWZpbmUgdnMgdmVjdG9yPHN0cmluZz4KI2RlZmluZSB2cGxsIHZlY3RvcjxwbGw+CiNkZWZpbmUgdnBpaSB2Z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gICAgICAgICAgICAgICBzY2FuZigiJWQiLCZhKQojZGVmaW5lIHNmMihhLGIpICAgICAgICAgICAgICBzY2FuZigiJWQgJWQiLCZhLCZiKQojZGVmaW5lIHNmMyhhLGIsYykgICAgICAgICAgICBzY2FuZigiJWQgJWQgJWQiLCZhLCZiLCZjKQojZGVmaW5lIHBmMShhKSAgICAgICAgICAgICAgICBwcmludGYoIiVkXG4iLGEpOwojZGVmaW5lIHBmMihhLGIpICAgICAgICAgICAgICBwcmludGYoIiVkICVkXG4iLGEsYikKI2RlZmluZSBwZjMoYSxiLGMpICAgICAgICAgICAgcHJpbnRmKCIlZCAlZCAlZFxuIixhLGIsYykKI2RlZmluZSBzZjFsbChhKSAgICAgICAgICAgICAgc2NhbmYoIiVsbGQiLCZhKQojZGVmaW5lIHNmMmxsKGEsYikgICAgICAgICAgICBzY2FuZigiJUk2NGQgJUk2NGQiLCZhLCZiKQojZGVmaW5lIHNmM2xsKGEsYixjKSAgICAgICAgICBzY2FuZigiJUk2NGQgJUk2NGQgJUk2NGQiLCZhLCZiLCZjKQojZGVmaW5lIHBmMWxsKGEpICAgICAgICAgICAgICBwcmludGYoIiVsbGRcbiIsYSk7CiNkZWZpbmUgcGYybGwoYSxiKSAgICAgICAgICAgIHByaW50ZigiJUk2NGQgJUk2NGRcbiIsYSxiKQojZGVmaW5lIHBmM2xsKGEsYixjKSAgICAgICAgICBwcmludGYoIiVJNjRkICVJNjRkICVJNjRkXG4iLGEsYixjKQojZGVmaW5lIF9jY2FzZSBwcmludGYoIkNhc2UgJWxsZDogIiwrK2NzKQojZGVmaW5lIF9jYXNlIGNvdXQ8PCJDYXNlICI8PCsrY3M8PCI6ICIKI2RlZmluZSBieSh4KSBbXShjb25zdCBhdXRvJiBhLCBjb25zdCBhdXRvJiBiKSB7IHJldHVybiBhLnggPCBiLng7IH0KCiNkZWZpbmUgYXNjaGUgY2Vycjw8IkVraGFuZSBhc2NoZVxuIjsKI2RlZmluZSByZXYodikgcmV2ZXJz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