#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;

#define f(i, a, b) for(int i = (a); i < (b); ++i)
#define PB push_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()


void solve()
{
	int n, s, d;
	cin >> n >> s >> d;
	int a, b;
	f(i,0,n)
	{
		cin >> a >> b;
		if(a >= s || b <= d)
			continue;
		cout << "Yes\n";
		return ;
	}
	cout << "No\n"; 
}

signed main()
{	
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int t;
	t = 1;
	while(t--)
		solve();
  return 0;
}


#include<algorithm>
#include<bitset>
#include<cmath>
#include<complex>
#include<deque>
#include<functional>
#include<iomanip>
#include<iostream>
#include<iterator>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<unordered_map>
#include<unordered_set>
#include<utility>
#include<vector>

using namespace std;
typedef long long ll;

#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--)
#define ALL(x) (x).begin(),(x).end()
#define SIZE(x) ((ll)(x).size())
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))
#define D()
#define MAXR 100000
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define INITA(a,i,j,v) for(ll k=i;k<=j;k++){a[k]=v;}

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const long long INF = 1LL<<60;
const long long MOD = 1000000007;

int main() {
    int a, b; cin >> a >> b;
    int c = a + b;
    // a: 無脂乳固分
    // b: 乳脂肪分
    // c: 乳固形分
    if (c >= 15 && b >= 8) {
        cout << 1 << endl;
    } else if (c >= 10 && b >= 3) {
        cout << 2 << endl;
    } else if (c >= 3) {
        cout << 3 << endl;
    } else {
        cout << 4 << endl;
    }
    return 0;
}