#include <iostream>
#include <vector>

using Edge = int;
using Vertex = std::vector<Edge>;
using Graph = std::vector<Vertex>;

Graph g;

int main()
{
    int n, m;
    scanf("%d %d", &n, &m);
    g.resize(n);
    for (int i = 0; i < m; i++)
    {
        int a, b;
        scanf("%d %d", &a, &b);
        a--, b--;
        g[a].push_back(b);
    }
    printf("NO");
    return 0;
}
