package main import ( "fmt" "strconv" "strings" ) func main() { var s, t string fmt.Scan(&s, &t) std := strings.Split(s, ".") tgt := strings.Split(t, ".") ans := "YES" for i := 0; i < 3; i++ { S, _ := strconv.Atoi(std[i]) T, _ := strconv.Atoi(tgt[i]) if T > S { ans = "NO" break } } fmt.Println(ans) }