package main import ( "bufio" "fmt" "os" "strconv" "strings" ) func main() { var sver, dver int sc := bufio.NewScanner(os.Stdin) sc.Scan() svers := strings.Split(sc.Text(), ".") sc.Scan() dvers := strings.Split(sc.Text(), ".") for i := 0; i < 3; i++ { sver, _ = strconv.Atoi(svers[i]) dver, _ = strconv.Atoi(dvers[i]) if dver < sver { fmt.Println("YES") os.Exit(0) } else if dver > sver { fmt.Println("NO") os.Exit(0) } } fmt.Println("YES") }