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 } else if T < S { ans = "YES" break } else { continue } } fmt.Println(ans) }