package main import ( "bufio" "fmt" "os" "strconv" "strings" ) func version(sc *bufio.Scanner) []int { sc.Scan() input := strings.Split(sc.Text(), ".") version := make([]int, len(input)) for i, v := range input { if j, e := strconv.Atoi(v); e != nil { panic(e) } else { version[i] = j } } return version } func powerInt(a, b int) int { result := 1 for i := 0; i < b; i++ { result *= a } return result } func main() { sc := bufio.NewScanner(os.Stdin) ver0 := version(sc) ver1 := version(sc) n := len(ver0) diff := 0 for i := 0; i < n; i++ { diff += ver0[i] * powerInt(1000, n-i) diff -= ver1[i] * powerInt(1000, n-i) } if diff < 0 { fmt.Println("NO") } else { fmt.Println("YES") } }