#include <bits/stdc++.h>
#define rep0(i,r) for (int i=0,i##end=r;i<i##end;++i)
#define rep(i,l,r) for (int i=l;i<=r;++i)
#define per(i,r,l) for (int i=r;i>=l;--i)
#define pr pair<int,int>
#define mp make_pair
#define fi first
#define se second
#define ll long long
#define pb push_back
using namespace std;
const int N=2e5+5;
int e[N][2],c[N],tag[N],dfn[N],dc; vector<pr> G[N];
void dfs(int u,int f){
	dfn[u]=++dc;
	rep0(i,G[u].size()){
		int v=G[u][i].fi,t=G[u][i].se;
		if (t){
			if (!dfn[v]) tag[t]=1;
			else if (dfn[v]<dfn[u]&&v!=f) tag[t]=1;
		}
		if (!dfn[v]) dfs(v,u);
	}
}
int main(){
	int n,m; scanf("%d%d",&n,&m);
	rep(i,1,m) scanf("%d%d",&e[i][0],&e[i][1]);
	rep(i,1,n) scanf("%d",&c[i]);
	rep(i,1,m){
		int u=e[i][0],v=e[i][1];
		if (c[u]==c[v]) G[u].pb(mp(v,i)),G[v].pb(mp(u,0));
	}
	rep(i,1,n) if (!dfn[i]) dfs(i,0);
	rep(i,1,m){
		int u=e[i][0],v=e[i][1];
		if (c[u]==c[v]) puts(tag[i]?"->":"<-");
		else if (c[u]<c[v]) puts("<-");
		else puts("->");
	}
	return 0;
}
#include <bits/stdc++.h>
using namespace std;

#define repi(i, a, n) for (int i = a; i < (int)(n); ++i)
#define rep(i, n) repi(i, 0, n)
#define all(v) begin(v), end(v)

using ll = long long;

int main() {
  // freopen("1.txt", "rb", stdin);
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);

  int V, T, S, D;
  cin >> V >> T >> S >> D;

  if (D < V * T || D > V * S) {
    cout << "Yes" << '\n';
  } else {
    cout << "No" << '\n';
  }

  return 0;
}