H, W = map(int, raw_input().split()) ans = 'NO' for i in range(0, H): s = raw_input() for j in range(0, W-4): if s[j]=='L' and s[j+1]=='O' and s[j+2]=='V' and s[j+3]=='E': ans = 'YES' break if ans == 'YES': break print ans