Dora is tired after traveling the country twice and asks for help determining if her map of city roads contains any cycles. The input will describe a directed graph of N cities and M roads, with each of M lines providing the two cities connected by a bidirectional road. The output should be 'YES' if any cycle is present in the graph, or 'NO' if no cycle exists.