package main import ( "fmt" "regexp" "strconv" ) func readVersion() (z [3]int) { var s string fmt.Scan(&s) re := regexp.MustCompile("\\d") for i, m := range re.FindAllString(s, 3) { x, _ := strconv.Atoi(m) z[i] = x } return } func main() { v0, v1 := readVersion(), readVersion() for i := 0; i < 3; i++ { if v0[i] < v1[i] { fmt.Println("NO") return } } fmt.Println("YES") }