package main import ( "fmt" "strconv" "strings" ) func main() { var s0, s1 string fmt.Scan(&s0, &s1) ss0 := strings.Split(s0, ".") ss1 := strings.Split(s1, ".") i0 := make([]int, 3) i1 := make([]int, 3) for i := 0; i < 3; i++ { i0[i], _ = strconv.Atoi(ss0[i]) i1[i], _ = strconv.Atoi(ss1[i]) } var ans string if i0[0] > i1[0] { ans = "YES" } else if i0[0] == i1[0] && i0[1] > i1[1] { ans = "YES" } else if i0[0] == i1[0] && i0[1] == i1[1] && i0[2] >= i1[2] { ans = "YES" } else { ans = "NO" } fmt.Println(ans) }