package main import ( "bufio" "fmt" "os" "strconv" "strings" ) func convH2S(speedH float64) float64 { return speedH / 60 / 60 / 1000 } func judgeCandR(sections []float64, xs, ys float64) bool { for i := 0; i < len(sections)-2; i++ { kobaS := sections[i] / xs if ys*kobaS > sections[i+1] { return false } } return true } func main() { scanner := bufio.NewScanner(os.Stdin) scanner.Scan() speed := strings.Fields(scanner.Text()) x, _ := strconv.ParseFloat(speed[0], 32) y, _ := strconv.ParseFloat(speed[1], 32) scanner.Scan() n, _ := strconv.Atoi(scanner.Text()) scanner.Scan() sections := strings.Fields(scanner.Text()) a := make([]float64, 0, n) for _, val := range sections { val, _ := strconv.ParseFloat(val, 32) a = append(a, val) } xs, ys := convH2S(x), convH2S(y) if judgeCandR(a, xs, ys) { fmt.Println("YES") } else { fmt.Println("NO") } }