n,m = map(int,input().split()) l = [input() for i in range(n)] for i in l: k = i.find("LOVE") if k != -1: flag = "yes" break else: flag = "no" if flag == "yes": print("Yes") else: print("No")