Finding cliques ---------------- A classical problem in graph theory involves finding cliques. Consider an undirected graph with n vertices. A clique is a complete subgraph - i.e., it is a set of k nodes such that all possible edges between these k nodes exist. This problem asks you if a clique exists in a given graph. To make things simple your are told that k=4, i.e., you are looking for a clique of size 4. Input ----- The input will contain multiple instances. The first line of each instance has two integers - the number of nodes n and the number of edges m. The second line has m pairs of numbers each denoting an undirected edge. Assume that the nodes are labeled 1 through n. You may assume there are no repeats in the edge list. You are also given that n<20, m < 100. The end of the input will be indicated by a line containing 0 0. This case should not be processed. Output ------ The output should contain one line for each case. Each line should have a YES or a NO, depending on whether there is a clique of size 4 or not. Sample input ------------ 4 6 1 2 2 3 3 4 4 1 1 3 2 4 0 0 Sample output ------------- YES