#include <iostream>
using namespace std;
int n, m;
int road[800][800] = {0};
bool avail = false;
bool visited[800];
void dfs(int s, int t) {
if(s == t) {
avail = true;
return;
}
visited[s] = true;
for(int i=0; i<n; i++) {
if(road[s][i] == 0 || visited[i]) continue;
visited[i] = true;
dfs(i, t);
visited[i] = false;
if(avail == true) break;
}
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
//int n, m;
while(cin >> n >> m) {
//int road[n][n] = {0};
for(int i=0; i<n; i++) {
for(int j=0; j<n; j++) {
road[i][j] = 0;
}
}
for(int i=0; i<m; i++) {
int a, b;
cin >> a >> b;
road[a-1][b-1] = 1;
}
int A, B;
cin >> A >> B;
avail = false;
dfs(A-1, B-1);
if(avail == true) cout << "Yes!!!" << endl;
else cout << "No!!!" << endl;
}
}