#include <bits/stdc++.h>
#pragma GCC optimize(3)
#define int long long
#define ri register
#define mk make_pair
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define is insert
#define es erase
using namespace std; const int N=210;
inline int read()
{
	int s=0, w=1; ri char ch=getchar();
	while(ch<'0'||ch>'9') { if(ch=='-') w=-1; ch=getchar(); }
	while(ch>='0'&&ch<='9') s=(s<<3)+(s<<1)+(ch^48), ch=getchar();
	return s*w;
}
int n,m,c[N],to[N][N],v1[N*N],v2[N*N];
struct Edge { int u,v; }e[N*N];
int Ans[N*N];
struct Node { int u,ty,id; };
vector<Node> G[N];
void DFS(int x)
{
	for(auto i:G[x])
	{
		if(~Ans[i.id]) continue;
		if(c[x]^c[i.u]) continue;
		Ans[i.id]=i.ty;
		DFS(i.u);
	}
}
signed main()
{
	n=read(), m=read();
	memset(Ans,-1,sizeof(Ans));
	for(ri int i=1;i<=m;i++)
	{
		e[i].u=read(), e[i].v=read();
		G[e[i].u].eb((Node){e[i].v,0,i});
		G[e[i].v].eb((Node){e[i].u,1,i});
	}
	for(ri int i=1;i<=n;i++) c[i]=read();
	for(ri int i=1;i<=m;i++)
	{
		if(c[e[i].u]<c[e[i].v]) Ans[i]=1;
		else if(c[e[i].u]>c[e[i].v]) Ans[i]=0;
	}
	for(ri int i=1;i<=m;i++)
	{
		if(~Ans[i]) continue;
		DFS(e[i].u);
	}
	for(ri int i=1;i<=m;i++) Ans[i]?puts("<-"):puts("->");
	return 0;
}
#include <bits/stdc++.h>
using namespace std;

int main() {
  int N, S, D;
  cin >> N >> S >> D;
  vector<int> X(N), Y(N);
  for (int i = 0; i < N; i++) {
    cin >> X.at(i) >> Y.at(i);
  }
  int count = 0;
  for (int i = 0; i < N; i++) {
    if (X.at(i) < S && Y.at(i) > D) {
      count++;
    }
  }
  if (count == 0) {
    cout << "No" << endl;
  }
  else {
    cout << "Yes" << endl;
  }
}
