a,b = map(int,input().split()) array = [] for i in range(a): line = input() array.append(line) for i in range(a): if "LOVE" in array[i]: print("YES") break else: print("NO")