x,y,_,*s=`dd`.split.map &:to_i;puts s.each_cons(2).any?{|a,b|b*x