KASEKI=gets.split('.') TARGET=gets.split('.') if TARGET[0]==KASEKI[0] && TARGET[1]==KASEKI[1] && TARGET[2]<=KASEKI[2] puts "YES" elsif TARGET[0]==KASEKI[0] && TARGET[1]==KASEKI[1] && KASEKI[2]