package main

import "fmt"

func main() {
	var r, x, y, nx, ny int64
	fmt.Scanf("%d %d %d %d %d", &r, &x, &y, &nx, &ny)
	s := (x-nx)*(x-nx) + (y-ny)*(y-ny)
	r *= 2
	var i int64
	for i = 0; i*i*r*r < s; i++ {

	}
	fmt.Println(i)
}


package main

import (
  "os"
  "bufio"
  "strconv"
  "fmt"
  "math"
)

var scanner *bufio.Scanner

func getI() int64 {
  scanner.Scan()
  x, _ := strconv.ParseInt(scanner.Text(), 10, 64)
  return x
}
func getF() float64 {
  scanner.Scan()
  x, _ := strconv.ParseFloat(scanner.Text(), 64)
  return x
}
func getS() string {
  scanner.Scan()
  return scanner.Text()
}

func main() {
  scanner = bufio.NewScanner(os.Stdin)
  scanner.Split(bufio.ScanWords)
  writer := bufio.NewWriter(os.Stdout)
  defer writer.Flush()

  r, x1, y1, x2, y2 := getI(), getI(), getI(), getI(), getI()
  d := math.Sqrt(float64((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)))
  result := int(math.Ceil(d / float64(2*r)))
  writer.WriteString(fmt.Sprintf("%d\n", result))
}


package main

import (
	"fmt"
	"math"
)

func main() {
	var r, x, y, x1, y1 float64
	fmt.Scan(&r, &x, &y, &x1, &y1)
	fmt.Println(math.Ceil(math.Hypot(x-x1, y-y1) * .5 / r))
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
)

func I(i interface{}, delim string) error {
	_, err := fmt.Fscanf(r, "%v"+delim, i)
	return err
}

func O(o interface{}, delim string) {
	fmt.Fprintf(w, "%v"+delim, o)
}

var (
	r *bufio.Reader
	w *bufio.Writer
)

func init() {
	if f, err := os.Open("in.txt"); err == nil {
		r = bufio.NewReader(f)
	} else {
		r = bufio.NewReader(os.Stdin)
	}
	w = bufio.NewWriter(os.Stdout)
}

func main() {
	defer w.Flush()
	var n int64
	for I(&n, "\n") == nil {
		solve(n)
	}
}

func solve(n int64) {
	var s []byte
	I(&s, "\n")
	a, b := make([]int, len(s)/2), make([]int, len(s)/2)
	for i, v := range s[:len(s)/2] {
		a[i] = int(v)
	}
	for i, v := range s[len(s)/2:] {
		b[i] = int(v)
	}
	sort.Ints(a)
	sort.Ints(b)
	aa := false
	bb := false
	for i := 0; i < len(a); i++ {
		if a[i] > b[i] {
			aa = true
		} else if a[i] < b[i] {
			bb = true
		} else {
			aa = true
			bb = true
		}
	}
	if aa && bb {
		O("NO", "\n")
	} else {
		O("YES", "\n")
	}
}


package main

import (
    "fmt"
    "sort"
)

func main() {
    var n int
    var s string
    fmt.Scan(&n)
    fmt.Scan(&s)
    left := make([]int,n)
    for i := 0; i < n; i++ {
        left[i] = int(s[i])
    }
    sort.Ints(left)
    right := make([]int,n)
    for i := n; i < (2*n); i++ {
        right[i-n] = int(s[i])
    }
    sort.Ints(right)
    ans := true
    if left[0] == right[0] {
        ans = false
    } else {
        for i := 1; i < n; i++ {
            if ((left[i] >= right[i]) && (left[i-1] <= right[i-1])) || ((left[i] <= right[i]) && (left[i-1] >= right[i-1])) {
                ans = false
                break
            }
        }
    }
    if ans { fmt.Println("YES") } else { fmt.Println("NO") }
}


package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	if n%5 == 0 {
		fmt.Print(n / 5)
		return
	}
	fmt.Print(n/5 + 1)
}


package main

import "fmt"

func main() {
	var x uint32
	fmt.Scanf("%d\n", &x)
	if x%5 > 0 {
		x = x/5 + 1
	} else {
		x = x / 5
	}
	fmt.Println(x)
}


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

func main() {
	in := bufio.NewReader(os.Stdin)
	var n uint32
	fmt.Fscanf(in, "%d\n", &n)
	fmt.Println(math.Ceil(float64(n) / 5))
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
)

type sortRunes []rune

func (s sortRunes) Less(i, j int) bool {
	return s[i] < s[j]
}

func (s sortRunes) Swap(i, j int) {
	s[i], s[j] = s[j], s[i]
}

func (s sortRunes) Len() int {
	return len(s)
}

func need_automaton(input1 string, input2 string) bool {
	input1Bytes := []rune(input1)
	input2Bytes := []rune(input2)

	if len(input2Bytes) > len(input1Bytes) {
		return false
	}

	i, j := 0, 0

	for {
		if i >= len(input2Bytes) || j >= len(input1Bytes) {
			break
		}

		if input2Bytes[i] == input1Bytes[j] {
			i++
			j++
		} else {
			j++
		}
	}

	if i == len(input2Bytes) {
		return true
	} else {
		return false
	}
}

func need_array(input1 string, input2 string) bool {
	if len(input1) != len(input2) {
		return false
	}

	input1Bytes := []rune(input1)
	input2Bytes := []rune(input2)

	sort.Sort(sortRunes(input1Bytes))
	sort.Sort(sortRunes(input2Bytes))

	for i := 0; i < len(input1Bytes); i++ {
		if input1Bytes[i] != input2Bytes[i] {
			return false
		}
	}

	return true
}

func need_both(input1 string, input2 string) bool {
	input1Bytes := []rune(input1)
	input2Bytes := []rune(input2)

	sort.Sort(sortRunes(input1Bytes))
	sort.Sort(sortRunes(input2Bytes))

	if len(input2Bytes) > len(input1Bytes) {
		return false
	}

	i, j := 0, 0

	for {
		if i >= len(input2Bytes) || j >= len(input1Bytes) {
			break
		}

		if input2Bytes[i] == input1Bytes[j] {
			i++
			j++
		} else if input2Bytes[i] > input1Bytes[j] {
			j++
		} else {
			break
		}
	}

	if i == len(input2Bytes) {
		return true
	} else {
		return false
	}
}

func main() {
	var word1, word2 string
	scanner := bufio.NewScanner(os.Stdin)

	if scanner.Scan() {
		word1 = scanner.Text()
	}

	if scanner.Scan() {
		word2 = scanner.Text()
	}

	if need_array(word1, word2) {
		fmt.Println("array")
	} else if need_automaton(word1, word2) {
		fmt.Println("automaton")
	} else if need_both(word1, word2) {
		fmt.Println("both")
	} else {
		fmt.Println("need tree")
	}
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

var reader= bufio.NewReader(os.Stdin)
var writer= bufio.NewWriter(os.Stdout)
var cnt[33]int
var dp[105][105]int
var s string
var t string

func max(a int, b int) int {
	if a < b {
		return b
	}
	return a
}

func main()  {
	defer writer.Flush()
	fmt.Fscanf(reader, "%s\n", &s)
	for i := 0; i < len(s); i++ {
		cnt[int(s[i] - 'a')]++
	}
	fmt.Fscanf(reader, "%s\n", &t)
	for i := 0; i < len(t); i++ {
		cnt[int(t[i] - 'a')]--
	}

	var neg = 0
	var pos = 0

	for i := 0; i < 26; i++ {
		if cnt[i] > 0 {
			pos++
		}
		if cnt[i] < 0 {
			neg++
		}
	}

	if neg > 0 {
		fmt.Fprintf(writer, "need tree")
		return
	}

	if pos == 0 {
		fmt.Fprintf(writer, "array")
		return
	}

	var n = len(s)
	var m = len(t)
	for i := 1; i <= n; i++ {
		for j := 1; j <= m; j++ {
			if s[i - 1] == t[j - 1] {
				dp[i][j] = dp[i - 1][j - 1] + 1
			} else {
				dp[i][j] = max(dp[i - 1][j], dp[i][j - 1])
			}
		}
	}

	if dp[n][m] == m {
		fmt.Fprintf(writer, "automaton")
	} else {
		fmt.Fprintf(writer, "both")
	}
}


package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
	"regexp"
)

func main() {
	reader := bufio.NewReader(os.Stdin)
	re := regexp.MustCompile(`\r?\n`)

	st := [2]string{}

	for i := 0; i < 2; i++ {
		if _in, err := reader.ReadString('\n'); err != nil {
			if err != io.EOF {
				return
			}
		} else {
			st[i] = re.ReplaceAllString(_in, "")
		}
	}

	s := st[0]
	t := st[1]

	if len(s) < len(t) {
		fmt.Println("need tree")
	} else {
		j := 0
		auto := true
		for i := 0; i < len(t); i++ {
			if !auto {
				break
			}
			for true {
				if j >= len(s) {
					auto = false
					break
				} else if s[j] == t[i] {
					j++
					break
				}
				j++
			}
		}
		if auto {
			fmt.Println("automaton")
			return
		}

		sm := make(map[rune]int)
		for i := 0; i < len(s); i++ {
			sm[rune(s[i])] += 1
		}
		for j := 0; j < len(t); j++ {
			sm[rune(t[j])] -= 1
		}

		remain := 0
		has_neg := false
		for _, v := range sm {
			if v < 0 {
				has_neg = true
			}
			remain += v
		}
		if has_neg {
			fmt.Println("need tree")
		} else if remain == 0 {
			fmt.Println("array")
		} else {
			fmt.Println("both")
		}
	}
}


// 140A
package main

import (
	"fmt"
	"math"
)

func main() {
	var n, r, x int
	var c float64
	fmt.Scan(&n, &r, &x)
	if n == 1 {
		if x > r {
			fmt.Println("NO")
		} else {
			fmt.Println("YES")
		}

	} else {
		c = float64(x)/math.Sin(float64(3.14159)/float64(n)) + float64(x)
		c = c - float64(r)
		if c > 0.00001 {
			fmt.Println("NO")
		} else {
			fmt.Println("YES")
		}
	}
}


// 140A-mic
package main

import (
	"fmt"
	"math"
)

func no()  { fmt.Println("NO") }
func yes() { fmt.Println("YES") }

func main() {
	var n, R, r int
	fmt.Scan(&n, &R, &r)
	if n == 1 {
		if R < r {
			no()
		} else {
			yes()
		}
		return
	}
	if 2*r > R {
		no()
		return
	}
	if 2*r == R {
		if n == 2 {
			yes()
		} else {
			no()
		}
		return
	}
	a := math.Asin((float64(r)) / float64((R - r)))
	if a*float64(n)*2 > 0.000000001+math.Asin(1)*4 {
		no()
	} else {
		yes()
	}
}


//140A
package main
import (
	"fmt"
	"math"
)

func main() {
	var n, r, R int
	var a float32
	fmt.Scan(&n, &R, &r)
	if R < r {
		fmt.Println("NO")
	} else if R == r {
		if n == 1 {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	} else {
		if float64(r) > float64(R/2) {
			if n == 1 {
				fmt.Println("YES")
			} else {
				fmt.Println("NO")
			}
		} else {
			a = float32(3.14159265358/(math.Asin(float64(float64(r)/float64(R-r)))))
			if a < float32(n) {
				fmt.Println("NO")
			} else {
				fmt.Println("YES")
			}
		}
	}
}


package main

import "fmt"

func main() {
	var program string

	fmt.Scanln(&program)

	if outputs(program) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

func outputs(program string) bool {
	for _, letter := range program {
		if letter == 'H' || letter == 'Q' ||
			letter == '9' {
			return true
		}
	}

	return false
}


package main

import (
  "os"
  "bufio"
  "strconv"
)

var scanner *bufio.Scanner

func getI64() int64 {
  scanner.Scan()
  x, _ := strconv.ParseInt(scanner.Text(), 10, 64)
  return x
}
func getI() int {
  return int(getI64())
}
func getF() float64 {
  scanner.Scan()
  x, _ := strconv.ParseFloat(scanner.Text(), 64)
  return x
}
func getS() string {
  scanner.Scan()
  return scanner.Text()
}

func main() {
  scanner = bufio.NewScanner(os.Stdin)
  scanner.Split(bufio.ScanWords)
  writer := bufio.NewWriter(os.Stdout)
  defer writer.Flush()

  s := getS()
  for _, ch := range s {
    if ch == 'H' || ch == 'Q' || ch == '9' {
      writer.WriteString("YES\n")
      return
    }
  }
  writer.WriteString("NO\n")
}


package main
import (
	"fmt"
	"unicode/utf8"
)

func main() {
	var counter int
	counter = 0
	var input string
	fmt.Scan(&input)
	len := utf8.RuneCountInString(input)

	for i:=0; i<len;i++ {
			if input[i] == 'H' || input[i]=='Q'||input[i]=='9'{
			counter++
			}else {}
	}

	if counter>0 {
		fmt.Println("YES")
	} else {fmt.Println("NO")}
}


package main
import (
	"fmt"
	"unicode/utf8"
)

func main() {
	var counter int
	counter = 1
	var input string
	var cek bool
	cek = false
	fmt.Scan(&input)
	len := utf8.RuneCountInString(input)

	for i:=1; i<len;i++ {
			if input[i] == input[i-1]{
			counter+=1
				if counter==7 {
					cek=true
				}
			}else { counter=1}
	}

	if cek==true {
		fmt.Println("YES")
	} else {fmt.Println("NO")}
}


package main

import "fmt"

func main() {
	var s string
	var last byte
	var count int
	var flag bool = false
	fmt.Scanf("%s", &s)
	last = s[0]
	for i := 1; i < len(s); i++ {
		if s[i] == last {
			count++
		} else {
			count = 0
		}
		if count == 6 {
			flag = true
			break
		}
		last = s[i]
	}
	if flag {
		fmt.Printf("YES")
	} else {
		fmt.Printf("NO")
	}
}


package main

import (
	"fmt"
)

func main() {
	var s string
	fmt.Scan(&s)
	var len, num int = len(s), 1
	for i := 0; i < len; i++ {
		if i != 0 && s[i] == s[i - 1] {
			num++
		} else {
			num = 1
		}
		if num == 7 {
			break
		}
	}
	if num == 7 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import (
	"fmt"
	"strings"
)

func main() {
	var n int
	fmt.Scan(&n)
	var inp string
	fmt.Scan(&inp)
	bySum := func(x int) int { return x / 11 }
	possBySum := bySum(n)
	byReqSymb := func(x string) int { return strings.Count(x, "8") }
	possByReqSymb := byReqSymb(inp)
	if possBySum >= possByReqSymb {
		fmt.Println(possByReqSymb)
	} else {
		fmt.Println(possBySum)
	}
}


package main

import (
	"bufio"
	"bytes"
	"fmt"
	"os"
)

func main() {
	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	var n int
	var digits []byte
	for {
		if _, err := fmt.Fscan(reader, &n, &digits); err != nil {
			break
		}
		solve(n, digits)
	}
}

func solve(n int, digits []byte) {
	cnt := bytes.Count(digits, []byte("8"))
	for x := cnt; x >= 0; x-- {
		if (n-x)/10 >= x {
			fmt.Println(x)
			break
		}
	}
}

func min(x, y int) int {
	if x < y {
		return x
	}
	return y
}


package main

import (
	"bufio"
	"bytes"
	"fmt"
	"os"
)

var n int
var digits []byte

func main() {
	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)
	defer writer.Flush()
	for {
		if _, err := fmt.Fscan(reader, &n, &digits); err != nil {
			break
		}
		solve()
	}
}

func solve() {
	cnt := bytes.Count(digits, []byte("8"))
	for x := cnt; x >= 0; x-- {
		if (n-x)/10 >= x {
			fmt.Println(x)
			break
		}
	}
}

func min(x, y int) int {
	if x < y {
		return x
	}
	return y
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Buffer(make([]byte, 2048*2048), 2048*2048)
	scanner.Split(bufio.ScanWords)

	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	scanner.Scan()
	m, _ := strconv.Atoi(scanner.Text())

	// answer
	ans := make([]int, n)

	s := make([]int, m)
	d := make([]int, m)
	sd := make([]int, m)
	c := make([]int, m)
	for i := 0; i < m; i++ {
		scanner.Scan()
		s[i], _ = strconv.Atoi(scanner.Text())
		scanner.Scan()
		d[i], _ = strconv.Atoi(scanner.Text())
		sd[i] = d[i]
		scanner.Scan()
		c[i], _ = strconv.Atoi(scanner.Text())
	}

	for i := 0; i < n; i++ {
		ex := nextExam(s, d, c, i+1)
		if ex == -1 {
			ans[i] = 0
			continue
		}
		if d[ex] == i+1 {
			if c[ex] != 0 {
				fmt.Println(-1)
				return
			}
			ans[i] = m + 1
			continue
		}
		ans[i] = ex + 1
		c[ex]--
	}

	for i := 0; i < n; i++ {
		fmt.Printf("%d ", ans[i])
	}
	fmt.Println()
}

func nextExam(s, d, c []int, today int) int {
	minVal := -1
	m := len(d)
	for i := 0; i < m; i++ {
		if d[i] < today {
			continue
		}
		if d[i] == today {
			return i
		}
		if c[i] == 0 {
			continue
		}
		if s[i] > today {
			continue
		}
		if minVal == -1 || d[i] < d[minVal] {
			minVal = i
		}
	}
	return minVal
}


package main

import (
	"bufio"
	. "fmt"
	"io"
	"os"
	"sort"
)

// github.com/EndlessCheng/codeforces-go
func CF978G(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()
	type pair struct{ i, d int }

	var n, m, s, d int
	Fscan(in, &n, &m)
	pr := make([]int, m)
	todo := make([][]pair, n+1)
	has := make([]bool, n+1)
	for i := range pr {
		Fscan(in, &s, &d, &pr[i])
		for j := s; j < d; j++ {
			todo[j] = append(todo[j], pair{i, d})
		}
		if has[d] {
			Fprint(out, -1)
			return
		}
		has[d] = true
	}
	var ans []interface{}
o:
	for i := 1; i <= n; i++ {
		if has[i] {
			ans = append(ans, m+1)
			continue
		}
		sort.Slice(todo[i], func(j, k int) bool { return todo[i][j].d < todo[i][k].d })
		for _, p := range todo[i] {
			if pr[p.i] > 0 {
				pr[p.i]--
				ans = append(ans, p.i+1)
				continue o
			}
		}
		ans = append(ans, 0)
	}
	for _, left := range pr {
		if left > 0 {
			Fprint(out, -1)
			return
		}
	}
	Fprint(out, ans...)
}

func main() { CF978G(os.Stdin, os.Stdout) }


package main

import (
	"fmt"
	"sort"
)

const (
	MaxN = 128
)

type exam struct {
	s, d, c, index int
}

var n, m int
var e [MaxN]exam
var s [MaxN]int

func main() {
	fmt.Scanf("%d %d\n", &n, &m)
	for i := 0; i < m; i++ {
		fmt.Scanf("%d %d %d\n", &e[i].s, &e[i].d, &e[i].c)
		e[i].index = i + 1
	}
	sort.Slice(e[:m], func(i, j int) bool {
		return e[i].d < e[j].d
	})
	for i := 0; i < m; i++ {
		s[e[i].d] = m + 1
	}
	for i := 0; i < m; i++ {
		start := e[i].s
		for ;start <= n; start++ {
			if s[start] == 0 {
				break
			}
		}
		if start == n+1 || start > e[i].d {
			fmt.Println(-1)
			return
		}
		for counter := 0; counter < e[i].c; {
			if s[start + counter] != 0  {
				if start + counter == e[i].d {
					fmt.Println(-1)
					return
				}
				start++
				continue
			}
			s[start + counter] = e[i].index
			counter++
		}
	}
	for i := 1; i <= n; i++ {
		fmt.Printf("%d ", s[i])
	}
}


package main
import "fmt"

func main(){
	var s string
	fmt.Scan(&s)
	if s[0]!='-' {
		fmt.Print(s)
		return
	}
	n:=len(s)
	if (n==3) && (s[0]=='-') && (s[2]=='0') {
		fmt.Print(0)
		return
	}

	if s[n-1]<s[n-2]{
		fmt.Printf("%s%s\n",s[:n-2],s[n-1:])
	} else {
		fmt.Print(s[:n-1])
		fmt.Println()
	}
}


package main
import (
    "fmt"
)
func main() {
    var n int
    var x int
    var y int
    fmt.Scan(&n)
    x= n/10
    y= n/100 * 10 + n %10
    if n >= 0 {
        fmt.Println(n)
    }else if x > y {
            fmt.Println(x)
        } else {fmt.Println(y)
    }

    }


package main

import (
	"bufio"
	"fmt"
	"io"
	"math/rand"
	"os"
)

const INF  = 1000000001

type Pair struct {
	first, second int
}

func sort(arr []Pair) []Pair {
	if len(arr) < 2 {
		return arr
	}
	left := 0
	right := len(arr) - 1
	pivot := rand.Int() % len(arr)

	arr[pivot], arr[right] = arr[right], arr[pivot]

	for i := 0; i < len(arr); i++ {
		if arr[i].first > arr[right].first {
			arr[i], arr[left] = arr[left], arr[i]
			left++
		}
	}

	arr[left], arr[right] = arr[right], arr[left]

	sort(arr[:left])
	sort(arr[left+1:])
	return arr
}

func sort2(arr []int) []int {
	if len(arr) < 2 {
		return arr
	}
	left := 0
	right := len(arr) - 1
	pivot := rand.Int() % len(arr)

	arr[pivot], arr[right] = arr[right], arr[pivot]

	for i := 0; i < len(arr); i++ {
		if arr[i] < arr[right] {
			arr[i], arr[left] = arr[left], arr[i]
			left++
		}
	}

	arr[left], arr[right] = arr[right], arr[left]

	sort2(arr[:left])
	sort2(arr[left+1:])
	return arr
}

func gcd (a, b int64) int64 {
	if b == 0 {
		return a
	}
	return gcd (b, a % b);
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func solution(reader io.Reader, writer io.Writer) {
	var n int
	fmt.Fscanf(reader, "%d", &n)
	if n >= 0 {
		fmt.Println(n)
	} else {
		n = -n
		a := n % 10
		n /= 10
		b := n % 10
		n /= 10
		n *= 10
		fmt.Println((n + min(a, b)) * -1)
	}
}

func main() {

	//stdin, err := os.Open("file.in")
	//if err != nil {
	//	panic(err)
	//}
	//defer stdin.Close()
	stdin := os.Stdin
	reader := bufio.NewReaderSize(stdin, 1024*1024)

	//stdout, err := os.Create("file.out")
	//if err != nil {
	//	panic(err)
	//}
	//defer stdout.Close()
	stdout := os.Stdout
	writer := bufio.NewWriterSize(stdout, 1024*1024)
	defer writer.Flush()

	solution(reader, writer)
}


package main

import "fmt"

var s,p,r string
func main(){
    fmt.Scanf("%s\n%s", &s, &p)
    ls := len(s)
    response:= "NO"
    if ls == len(p) {
        for i:=0; i < len(s); i++{
            r = string(s[i]) + r
        }
        if (r==p){
            response = "YES"
        }
    }
    fmt.Println(response)
}


package main

import "fmt"

// spec lets us assume ascii
func test(w1, w2 string) bool {
	lw := len(w1)
	if lw != len(w2) {
		return false
	}
	for i := 0; i < lw; i++ {
		if w1[i] != w2[lw-1-i] {
			return false
		}
	}
	return true

}
func main() {
	var word1 string
	var word2 string

	fmt.Scan(&word1)
	fmt.Scan(&word2)

	if test(word1, word2) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}

}


package main

import "fmt"

func main() {
    var s,t string
    fmt.Scan(&s,&t)
    var ans bool
    if (len(s) != len(t)) {
        ans = false
    } else {
        ans = true
        len := len(s)
        for i := 0; i < len; i++ {
            if s[i] != t[len-i-1] {
                ans = false
                break
            }
        }
    }
    if ans { fmt.Println("YES") } else { fmt.Println("NO") }
}


package main

import "fmt"

func main() {
	var y int
	fmt.Scanf("%v", &y)
	for i := y + 1; i <= 999999999; i++ {
		if check(i) {
			fmt.Println(i)
			break
		}
	}
}

func check(num int) bool {
	var cache [128]bool
	for num > 0 {
		d := num % 10
		if cache[d] {
			return false
		}
		cache[d] = true
		num /= 10
	}
	return true
}


package main

import "fmt"
import "sort"
import "strconv"

func tst(n int) (res bool) {
	st := strconv.Itoa(n)
	s := make([]int, len(st))
	for i, c := range st {
		s[i] = int(c)
	}
	sort.Ints(s)
	res = false
	for i := 0; i < len(s)-1; i++ {
		if s[i] == s[i+1] {
			res = true
		}
	}
	return
}

func main() {
	var y int

	fmt.Scan(&y)

	n := y + 1
	for ; tst(n); n++ {
	}
	fmt.Println(n)
}


package main

import (
	"fmt"
	"strconv"
)

func main() {
	var year int
	var beautiful int

	fmt.Scanln(&year)

	beautiful = year + 1
	for !isBeautiful(strconv.Itoa(beautiful)) {
		beautiful++
	}

	fmt.Println(beautiful)
}

func isBeautiful(number string) bool {
	var distinctDigits = distinct(number)

	if len(distinctDigits) == len(number) {
		return true
	}

	return false
}

func distinct(str string) string {
	var uniqueChars []rune

	for _, letter := range str {
		if !contains(uniqueChars, letter) {
			uniqueChars = append(uniqueChars, letter)
		}
	}

	return string(uniqueChars)
}

func contains(slice []rune, char rune) bool {
	for _, element := range slice {
		if element == char {
			return true
		}
	}

	return false
}


package main

import (
	"fmt"
	"io/ioutil"
	"os"
	"strconv"
	"strings"
	"text/scanner"
)

func check(e error) {
	if e != nil {
		panic(e)
	}
}

func main() {
	var w, y int // first inputs to the problem

	dat, err := ioutil.ReadAll(os.Stdin)
	check(err)
	var str_data string = string(dat);

	reader := strings.NewReader(str_data)

	var scn scanner.Scanner
	scn.Init(reader)

    scn.Scan()
	var text string = scn.TokenText();

	w, err = strconv.Atoi(text)
	check(err)

	scn.Scan()
	text = scn.TokenText();

	y, err = strconv.Atoi(text)
	check(err)

	var max int
	if w > y {
		max = w
	} else {
		max = y
	}

	// if max is 6, numerator is 1
	// if max is 1, numerator is 6
	var numerator int = 6 - max + 1

	// now let's reduce if we can
	if numerator == 6 {
		fmt.Print("1/1");
	} else if numerator == 4 {
		fmt.Print("2/3")
	} else if numerator == 3 {
		fmt.Print("1/2")
	} else if numerator == 2 {
		fmt.Print("1/3")
	} else if numerator == 1 {
		fmt.Print("1/6")
	} else {
		fmt.Print("5/6")
	}
}


// http://codeforces.com/problemset/problem/9/A
// A. Die Roll
package main

import (
	"fmt"
)

func main() {
	var (
		y, w int32
	)

	ans := [...]string{"0/1", "1/6", "1/3", "1/2", "2/3", "5/6", "1/1"}

	fmt.Scan(&y)
	fmt.Scan(&w)
	if y > w {
		w = y
	}
	fmt.Println(ans[6-w+1])

}


package main

import (
	"fmt"
)

func main() {
	var y, w int
	if _, err := fmt.Scanf("%d %d\n", &y, &w); err != nil {
		return
	}

	win := 6 - max(y, w) + 1
	if win == 0 { // Impossible here
		fmt.Println("0/1")
	} else if win == 6 {
		fmt.Println("1/1")
	} else {
		g := gcd(win, 6)
		fmt.Printf("%d/%d\n", win/g, 6/g)
	}
}

func max(x, y int) int {
	if x > y {
		return x
	} else {
		return y
	}
}

func gcd(x, y int) int {
	if x < y {
		x, y = y, x
	}
	if y == 0 {
		return x
	} else {
		return gcd(y, x%y)
	}
}


package main
import "fmt"

func main() {
	var v, y, d int
	b := 6
	fmt.Scan(&v, &y)
	if v >= y{
		d = b+1 - v
	}else{
		d = b+1 - y
	}
	if d % 2 == 0{
		d /= 2
		b /= 2
	}
	if d % 3 == 0{
		d /= 3
		b /= 3
	}
	fmt.Printf("%d/%d", d, b)
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func solve() {
	a := readInt()
	b := readInt()
	if a < b {
		a = b
	}

	ar := []string{"0/1", "1/1", "5/6", "2/3", "1/2", "1/3", "1/6"}
	fmt.Println(ar[a])
}

var scanner *bufio.Scanner

func main() {
	scanner = bufio.NewScanner(os.Stdin)
	const MaxTokenLength = 1024 * 1024
	scanner.Buffer(make([]byte, 0, MaxTokenLength), MaxTokenLength)
	scanner.Split(bufio.ScanWords)
	solve()
}

func readString() string {
	scanner.Scan()
	return scanner.Text()
}

func readInt() int {
	val, _ := strconv.Atoi(readString())
	return val
}

func readInt64() int64 {
	v, _ := strconv.ParseInt(readString(), 10, 64)
	return v
}


package main

import "fmt"

func GCD(a,b int) int { if b == 0 { return a } else { return GCD(b,a%b) } }
func max(a,b int) int { if a > b { return a } else { return b } }

func main() {
    var Y,W int
    fmt.Scan(&Y,&W)
    n, d := 6-max(Y,W)+1, 6
    gcd := GCD(n,d)
    n /= gcd
    d /= gcd
    fmt.Printf("%d/%d\n",n,d)
}


package main

import (
	"fmt"
)

func main() {
	var a, b int
	fmt.Scan(&a, &b)
	var mx int = a
	if b > a {
		mx = b
	}
	if mx == 6 {
		fmt.Print(1, "/", 6)
	} else if mx == 5 {
		fmt.Print(1, "/", 3)
	} else if mx == 4 {
		fmt.Print(1, "/", 2)
	} else if mx == 3 {
		fmt.Print(2, "/", 3)
	} else if mx == 2 {
		fmt.Print(5, "/", 6)
	} else  {
		fmt.Print(1, "/", 1)
	}

}


package main

import "fmt"

func main()  {
	var yScore int
	fmt.Scan(&yScore)
	var wScore int
	fmt.Scan(&wScore)
	var maxNo int

	if yScore > wScore {
		maxNo = yScore
	} else if  yScore < wScore{
		maxNo = wScore
	} else {
		maxNo = wScore
	}
	maxNo = 7 - maxNo

	if maxNo == 0 {
		maxNo = 1
	}

	if 6 % maxNo   == 0 {
		theDenominator := 6 / maxNo
		fmt.Printf("1/%d", theDenominator)
	} else if 6 % maxNo == 2 {
		theNumerator := maxNo / 2
		fmt.Printf("%d/3", theNumerator)
	}  else {
		theNumerator := maxNo
		fmt.Printf("%d/6", theNumerator)
	}
}


package main

import (
	"bytes"
	"fmt"
	"io"
	"io/ioutil"
	"os"
)

func main() {
	var p, y int
	r := RapidReader()
	fmt.Fscan(r, &p, &y)
	for i := y; i >= 2 && i >= y-1000; i-- {
		if i <= p {
			continue
		}
		undivisible := true
		for k := 2; k <= p && k < 31623; k++ {
			if i%k == 0 {
				undivisible = false
				break
			}
		}
		if undivisible {
			fmt.Println(i)
			return
		}
	}
	fmt.Println(-1)
}

func RapidReader() io.Reader {
	b, _ := ioutil.ReadAll(os.Stdin)
	return bytes.NewReader(b)
}


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

var scanner *bufio.Scanner
var t [1e6 + 1]bool

func init_scanner() {
	scanner = bufio.NewScanner(os.Stdin)
	const MaxTokenLength = 1024 * 1024 * 20
	scanner.Buffer(make([]byte, 0, MaxTokenLength), MaxTokenLength)
	scanner.Split(bufio.ScanWords)
}

func readString() string {
	scanner.Scan()
	return scanner.Text()
}

func readInt() int {
	scanner.Scan()
	val, _ := strconv.Atoi(scanner.Text())
	return val
}

func is_prime(x int) bool {
	for i := 2; i*i <= x; i++ {
		if x%i == 0 {
			return false
		}
	}
	return true
}

func divides(x int, s []int) bool {
	for _, i := range s {
		if x%i == 0 {
			return true
		}
	}
	return false
}

func main() {
	init_scanner()
	p, y := readInt(), readInt()

	var s []int
	for i := 2; i <= int(math.Min(float64(p), math.Floor(math.Sqrt(float64(y))))); i++ {
		if is_prime(i) {
			s = append(s, i)
		}
	}

	ans := -1
	for i := y; i > int(math.Max(float64(p), float64(y-100000))); i-- {
		if !divides(i, s) {
			ans = i
			break
		}
	}

	fmt.Println(ans)
}


/*
URL:
https://codeforces.com/problemset/problem/937/B
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	p, y int
)

func main() {
	p, y = ReadInt2()

	for i := y; i > p; i-- {
		memo := TrialDivision(i)
		ok := true
		for k := range memo {
			if k <= p {
				ok = false
				break
			}
		}

		if ok {
			fmt.Println(i)
			return
		}
	}
	fmt.Println(-1)
}

// TrialDivision returns the result of prime factorization of integer N.
func TrialDivision(n int) map[int]int {
	var i, exp int
	p := map[int]int{}

	if n <= 1 {
		panic(errors.New("[argument error]: TrialDivision only accepts a NATURAL number"))
	}

	for i = 2; i*i <= n; i++ {
		exp = 0
		for n%i == 0 {
			exp++
			n /= i
		}

		if exp == 0 {
			continue
		}
		p[i] = exp
	}
	if n > 1 {
		p[n] = 1
	}

	return p
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	n, m, a, b := int64(0), int64(0), int64(0), int64(0)
	fmt.Fscanf(in, "%d %d\n", &n, &m)
	fmt.Fscanf(in, "%d %d\n", &a, &b)
	min := int64(n * m)
	max := int64(0)
	all := int64(n * m)
	for i := int64(0); i < n; i++ {
		nextS := int64(i)*int64(m) + int64(b)
		l := nextS - int64(a)
		if l <= 0 {
			l += all
		}
		gcdS := gcd(l, all)
		tmp := all / gcdS
		if tmp > max {
			max = tmp
		}
		if tmp < min {
			min = tmp
		}
		nextS = int64(i)*int64(m) + int64(m) - int64(b)
		l = nextS - int64(a)
		if l <= 0 {
			l += all
		}
		gcdS = gcd(l, all)
		tmp = all / gcdS
		if tmp > max {
			max = tmp
		}
		if tmp < min {
			min = tmp
		}
	}
	a = m - a
	for i := int64(0); i < n; i++ {
		nextS := int64(i)*int64(m) + int64(b)
		l := nextS - int64(a)
		if l <= 0 {
			l += all
		}
		gcdS := gcd(l, all)
		tmp := all / gcdS
		if tmp > max {
			max = tmp
		}
		if tmp < min {
			min = tmp
		}
		nextS = int64(i)*int64(m) + int64(m) - int64(b)
		l = nextS - int64(a)
		if l <= 0 {
			l += all
		}
		gcdS = gcd(l, all)
		tmp = all / gcdS
		if tmp > max {
			max = tmp
		}
		if tmp < min {
			min = tmp
		}
	}
	fmt.Fprintf(out, "%d %d\n", min, max)
	return
}

func gcd(a, b int64) int64 {
	if a%b == 0 {
		return b
	}
	return gcd(b, a%b)
}


package main

import (
    "bufio"
    "bytes"
    "fmt"
    "os"
)

type Prob struct {
    in *bufio.Reader
}

func (prob *Prob) NextLine() string {
    line, _, _ := prob.in.ReadLine()
    return string(line[:])
}

func (prob *Prob) NextByte() byte {
    bt, _ := prob.in.ReadByte()
    return bt
}

func (prob *Prob) Next() string {
    var buff bytes.Buffer
    bt := prob.NextByte()
    for bt == '\n' || bt == ' ' {
        bt = prob.NextByte()
    }
    for bt != '\n' && bt != ' ' {
        buff.WriteByte(bt)
        bt = prob.NextByte()
    }
    return buff.String()
}

func (prob *Prob) NextInt() int {
    var x int
    bt := prob.NextByte()
    for bt > '9' || bt < '0' {
        if bt == '-' {
            return -prob.NextInt()
        }
        bt = prob.NextByte()
    }
    for bt >= '0' && bt <= '9' {
        x = x * 10 + int(bt - '0')
        bt = prob.NextByte()
    }
    return x
}

func gcd(a int64, b int64) int64 {
    if a == 0 {
        return b
    }
    return gcd(b % a, a)
}

func (prob Prob) Solve() {
    n := int64(prob.NextInt())
    k := int64(prob.NextInt())
    a := int64(prob.NextInt())
    b := int64(prob.NextInt())

    ma := int64(-1)
    mi := int64(-1)
    s1 := a
    s2 := (k - a) % k
    for i := int64(1); i <= n; i++ {
        t1 := i * k + b
        t2 := i * k + (k - b) % k
        r1 := n * k / gcd(n * k, t1 - s1)
        if ma == -1 || ma < r1 {
            ma = r1
        }
        if mi == -1 || mi > r1 {
            mi = r1
        }
        r1 = n * k / gcd(n * k, t1 - s2)
        if ma == -1 || ma < r1 {
            ma = r1
        }
        if mi == -1 || mi > r1 {
            mi = r1
        }
        r1 = n * k / gcd(n * k, t2 - s1)
        if ma == -1 || ma < r1 {
            ma = r1
        }
        if mi == -1 || mi > r1 {
            mi = r1
        }
        r1 = n * k / gcd(n * k, t2 - s2)
        if ma == -1 || ma < r1 {
            ma = r1
        }
        if mi == -1 || mi > r1 {
            mi = r1
        }
    }

    fmt.Printf("%d %d\n", mi, ma)
}

func main() {
    Prob{in: bufio.NewReader(os.Stdin)}.Solve()
}


package main

import (
	"bufio"
	"fmt"
	// "math/big"
	"os"
)

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func p(a ...interface{})                { fmt.Fprint(writer, a...) }
func pln(a ...interface{})              { fmt.Fprintln(writer, a...) }
func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }

func scan(a ...interface{})            { fmt.Fscan(reader, a...) }
func scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }

func min(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}

func max(a, b int64) int64 {
	if a > b {
		return a
	}
	return b
}

func gcd(a, b int64) int64 {
	for b != 0 {
		a, b = b, a%b
	}
	return a
}

func posMod(a, mod int64) int64 {
	a = a % mod
	if a <= 0 {
		a += mod
	}
	return a
}

func main() {
	defer writer.Flush()

	var n, k, a, b, g, nk int64
	var x1, x2, y1, y2 int64
	var l1, l2, l3, l4 int64
	var mn, mx int64
	scan(&n, &k)
	scan(&a, &b)

	nk = n * k

	mn, mx = nk, 1

	for i := int64(0); i < n; i++ {
		x1, x2 = posMod(1-a, nk), posMod(1+a, nk)
		y1, y2 = posMod(i*k+1-b, nk), posMod(i*k+1+b, nk)
		// pln(i, "---------------------------------------------------")
		// pln(x1, x2, y1, y2)

		l1, l2, l3, l4 = posMod(y1-x1, nk), posMod(y2-x1, nk), posMod(y1-x2, nk), posMod(y2-x2, nk)

		g = gcd(l1, nk)
		// pln(i, l1, g)
		mn = min(mn, nk/g)
		mx = max(mx, nk/g)

		g = gcd(l2, nk)
		// pln(i, l2, g)
		mn = min(mn, nk/g)
		mx = max(mx, nk/g)

		g = gcd(l3, nk)
		// pln(i, l3, g)
		mn = min(mn, nk/g)
		mx = max(mx, nk/g)

		g = gcd(l4, nk)
		// pln(i, l4, g)
		mn = min(mn, nk/g)
		mx = max(mx, nk/g)
	}
	// pln("RESULT = ", mn, mx)
	pln(mn, mx)
	return
}


package main

import (
	"fmt"
	"io"
	"os"
)

func Solve(input io.Reader) (result string) {
	var n int
	fmt.Fscan(input, &n)
	n += 2
	array := make([]int, n)
	for i := 1; i < n-1; i++ {
		fmt.Fscan(input, &(array[i]))
	}
	index := 1
	for ; index < n; index++ {
		if array[index] <= array[index-1] {
			break
		}
	}
	for ; index < n; index++ {
		if array[index] != array[index-1] {
			break
		}
	}
	for ; index < n; index++ {
		if array[index] >= array[index-1] {
			break
		}
	}
	if index < n {
		return "NO\n"
	}
	return "YES\n"
}

func main() {
	fmt.Print(Solve(os.Stdin))
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

func I(i ...interface{}) error {
	_, err := fmt.Fscan(r, i...)
	return err
}

func O(o ...interface{}) {
	fmt.Fprint(w, o...)
}

var (
	r *bufio.Reader
	w *bufio.Writer
)

func init() {
	if f, err := os.Open("in.goC"); err == nil {
		r = bufio.NewReader(f)
	} else {
		r = bufio.NewReader(os.Stdin)
	}
	w = bufio.NewWriter(os.Stdout)
}

func main() {
	var n int
	for I(&n) == nil {
		solve(n)
	}
	w.Flush()
}

func solve(n int) {
	in := make([]int, n)
	for i := range in {
		I(&in[i])
	}
	var o int
	for o < n-1 && in[o] < in[o+1] {
		o++
	}
	for o < n-1 && in[o] == in[o+1] {
		o++
	}
	for o < n-1 && in[o] > in[o+1] {
		o++
	}
	if o == n-1 {
		O("YES\n")
	} else {
		O("NO\n")
	}
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func solve() {
	n := readInt()
	a := make([]int, n)
	freq := make([]int, 1002)
	start := make([]int, 1002)
	end := make([]int, 1002)
	up := 0
	for i := 0; i < n; i++ {
		a[i] = readInt()
		if freq[a[i]] == 0 {
			start[a[i]] = i
		}
		freq[a[i]]++
		end[a[i]] = i
		up = max(up, a[i])
	}
	index := up
	for i := 1; i <= start[index]; i++ {
		if a[i] <= a[i-1] {
			fmt.Println("NO")
			return
		}
	}
	for i := start[index]; i <= end[index]; i++ {
		if a[i] != index {
			fmt.Println("NO")
			return
		}
	}
	for i := end[index] + 1; i < len(a); i++ {
		if a[i] >= a[i-1] {
			fmt.Println("NO")
			return
		}
	}
	fmt.Println("YES")
}

var scanner *bufio.Scanner

func main() {
	scanner = bufio.NewScanner(os.Stdin)
	const MaxTokenLength = 1024 * 1024
	scanner.Buffer(make([]byte, 0, MaxTokenLength), MaxTokenLength)
	scanner.Split(bufio.ScanWords)
	solve()
}

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

func min(a int, b int) int {
	if a < b {
		return a
	}
	return b
}

// IO

func readString() string {
	scanner.Scan()
	return scanner.Text()
}

func readInt() int {
	val, _ := strconv.Atoi(readString())
	return val
}

func readInt64() int64 {
	v, _ := strconv.ParseInt(readString(), 10, 64)
	return v
}

func readIntArray(sz int) []int {
	a := make([]int, sz)
	for i := 0; i < sz; i++ {
		a[i] = readInt()
	}
	return a
}

func readInt64Array(n int) []int64 {
	res := make([]int64, n)
	for i := 0; i < n; i++ {
		res[i] = readInt64()
	}
	return res
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}


package main

import "fmt"

func main()  {
	var n,m,k int
	fmt.Scan(&n)
	fmt.Scan(&m)
	fmt.Scan(&k)

    if m==n&&n==k&&k==m {
	 fmt.Println("Yes")
	 return
	}
	for n>0{
		n--
		m--
		k--
	}
	if m>=0&&k>=0 {
		fmt.Println("Yes")
	}else{
		fmt.Println("No")
	}
}


package main

import (
	"fmt"
)

func main () {
	var n, m, k int
	var count int = 0
	fmt.Scan(&n, &m, &k)
	if m>=n {
		count++
	} else {
		count = 0
	}
	if k>=n {
		count++
	} else {
		count = 0
	}
	if count==2 {
		fmt.Println("yes")
	} else {
		fmt.Println("no")
	}
}


package main

import "fmt"

func main() {
	var n, m, k int
	fmt.Scan(&n, &m, &k)
	if n <= m && n <= k {
		fmt.Print("Yes")
	} else {
		fmt.Print("No")
	}
}


package main
import (
	"fmt"
)
func main() {
	var n,d int
	s :=0
	m :=true
	fmt.Scan(&n)
	for n!=0 {
		d = n%10
		n/=10
		if d==1 {
			s=0
		} else if d==4 && s<2  {
			s++
		} else {
			m=false
		}
	}
	if s!=0 {
		m=false
	}
	if m==true {
		fmt.Println("YES")
	} else {
	fmt.Println("NO")
	}
}


package main

import "fmt"

func main() {
    var s string
    fmt.Scan(&s)
    ans, in := true, 0
    for in < len(s) {
        if s[in] == '1' {
            in++
            if in < len(s) {
                if s[in] == '4' { in++ }
                if in < len(s) {
                    if s[in] == '4' { in++ }
                }
            }
        } else {
            ans = false
            break
        }
    }
    if ans { fmt.Println("YES") } else { fmt.Println("NO") }
}


package main

import (
	"fmt"
	"strings"
)

func main() {
	var num string
	fmt.Scan(&num)

	for _, v := range []string{"144", "14", "1"} {
		num = strings.Replace(num, v, " ", -1)
	}
	num = strings.Replace(num, " ", "", -1)

	if len(num) > 0 {
		fmt.Println("NO")
	} else {
		fmt.Println("YES")
	}
}


package main

import (
	"fmt"
)

func main() {
	var a, b, c int
	fmt.Scanf("%d\n%d\n%d", &a, &b, &c)
	if a == 1 && b != 1 && c != 1 {
		fmt.Println((a + b) * c)
	}
	if a != 1 && b != 1 && c == 1 {
		fmt.Println(a * (b + c))
	}
	if b == 1 && a != 1 && c != 1 {
		if a > c {
			fmt.Println(a * (b + c))
		} else {
			fmt.Println((a + b) * c)
		}
	}
	if a == 1 && b == 1 && c == 1 {
		fmt.Println(a + b + c)
	}
	if a != 1 && b != 1 && c != 1 {
		fmt.Println(a * b * c)
	}
	if a == 1 && b != 1 && c == 1 {
		fmt.Println(a + b + c)
	}
	if a == 1 && b == 1 && c != 1 {
		fmt.Println((a + b) * c)
	}
	if a != 1 && b == 1 && c == 1 {
		fmt.Println(a * (b + c))
	}
}


package main

import (
	"fmt"
	"sort"
)

func main() {
	var a, b, c int
	fmt.Scan(&a, &b, &c)
	if a != 1 && b != 1 && c != 1 {
		fmt.Print(a * b * c)
		return
	}
	var ans []int
    ans = append(ans, (a + b) * c)
	ans = append(ans, a * (b + c))
    ans = append(ans, a + b + c)
	sort.Ints(ans)
	fmt.Print(ans[2])
}


package main

import (
	"bufio"
	"os"
	"fmt"
)

var in *bufio.Reader = bufio.NewReader(os.Stdin)
var out *bufio.Writer = bufio.NewWriter(os.Stdout)

func f(x, y, z int, c chan int) {
	c <- x + y + z
	c <- x + y * z
	c <- (x + y) * z
	c <- x * y + z
	c <- x * (y + z)
	c <- x * y * z
	close(c)
}

func max(x, y int) int {
	if (x < y) {
		return y
	} else {
		return x
	}
}

func main() {
	defer out.Flush()

	var a, b, c int
	fmt.Fscan(in, &a, &b, &c)

	ch := make(chan int)
	go f(a,b,c, ch)

	var res int
	for i := range ch {
		res = max(res, i)
	}
	fmt.Println(res)
}


package main
import (
	"fmt"
	"math"
)

func main(){
	var n,m,K,len,pos int32
	fmt.Scanf("%d%d%d\n",&n,&m,&K)
	m--
	len,pos= 123456789,123456789
	var i int32
	for i=0;i<n;i++{
		var price int32
		fmt.Scanf("%d",&price)
		if price>0&& price<=K{
			if int32(math.Abs(float64(m-i)))< len{
				len,pos=int32(math.Abs(float64(m-i))),i
			}
		}
	}
	fmt.Printf("%d\n",int32(math.Abs(float64(pos-m)))*10)
}


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

func solve() {
	n := readInt()
	m := readInt() - 1
	k := readInt()
	ans := math.MaxInt32
	for i := 0; i < n; i++ {
		a := readInt()
		if a != 0 && a <= k {
			if ans > 10*abs(i-m) {
				ans = 10 * abs(i-m)
			}
		}
	}
	fmt.Println(ans)
}

var scanner *bufio.Scanner

func main() {
	scanner = bufio.NewScanner(os.Stdin)
	const MaxTokenLength = 1024 * 1024
	scanner.Buffer(make([]byte, 0, MaxTokenLength), MaxTokenLength)
	scanner.Split(bufio.ScanWords)
	solve()
}

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}
func min(a int, b int) int {
	if a < b {
		return a
	}
	return b
}

// IO

func readString() string {
	scanner.Scan()
	return scanner.Text()
}

func readInt() int {
	val, _ := strconv.Atoi(readString())
	return val
}

func readInt64() int64 {
	v, _ := strconv.ParseInt(readString(), 10, 64)
	return v
}

func readIntArray(sz int) []int {
	a := make([]int, sz)
	for i := 0; i < sz; i++ {
		a[i] = readInt()
	}
	return a
}

func readInt64Array(n int) []int64 {
	res := make([]int64, n)
	for i := 0; i < n; i++ {
		res[i] = readInt64()
	}
	return res
}


package main

import (
	"bufio"
	"flag"
	"fmt"
	"io"
	"log"
	"os"
	"runtime/pprof"
	"strconv"
	"math"
)

func run(s *InOut) {
	a, b, c := s.Next(), s.Next(), s.Next()
	if (a + b + c) % 2 > 0 {
		s.Println("Impossible")
		return
	}
	for x := 0; x <= min(a, b); x++ {
		y := b - x
		z := (a + b + c) / 2 - x - y
		if a == x + z && b == x + y && c == y + z {
			s.Println(x, " ", y, " ", z)
			return
		}
	}
	s.Println("Impossible")
}

func min(a... int) int {
	r := math.MaxInt32;
	for _, e := range a {
		if r > e {
			r = e
		}
	}

	return r
}

func main() {
	flag.Parse()
	if *cpuprofile != "" {
		f, err := os.Create(*cpuprofile)
		if err != nil {
			log.Fatal(err)
		}
		pprof.StartCPUProfile(f)
		defer pprof.StopCPUProfile()
	}
	s := NewInOut(os.Stdin, os.Stdout)
	defer s.Flush()

	run(s)
}

var cpuprofile = flag.String("cpuprofile", "", "write cpu profile to file")

type InOut struct {
	*bufio.Reader
	*bufio.Writer
}

func NewInOut(r io.Reader, w io.Writer) *InOut {
	return &InOut{bufio.NewReader(r), bufio.NewWriter(w)}
}

// Get Next Integer
func (s *InOut) Next() (r int) {
	b, _ := s.ReadByte()
	p := 1
	for (b < '0' || '9' < b) && b != '-' {
		b, _ = s.ReadByte()
	}
	if b == '-' {
		p = -1
		b, _ = s.ReadByte()
	}
	for '0' <= b && b <= '9' {
		r = 10*r + int(b-'0')
		b, _ = s.ReadByte()
	}
	return r * p
}

func (s *InOut) NextInt64() (r int64) {
	b, _ := s.ReadByte()
	p := int64(1)
	for (b < '0' || '9' < b) && b != '-' {
		b, _ = s.ReadByte()
	}
	if b == '-' {
		p = -1
		b, _ = s.ReadByte()
	}
	for '0' <= b && b <= '9' {
		r = 10*r + int64(b-'0')
		b, _ = s.ReadByte()
	}
	return r * p
}

// Get Next Line String
func (s *InOut) NextLine() (r string) {
	b, _ := s.ReadByte()
	for b == '\r' || b == '\n' {
		b, _ = s.ReadByte()
	}
	buf := make([]byte, 0)
	for ; b != '\r' && b != '\n'; b, _ = s.ReadByte() {
		buf = append(buf, b)
	}
	return string(buf)
}

// Get Next String using delimiter whitespace
func (s *InOut) NextStr() (r string) {
	return string(s.NextBytes())
}

// Get Next String using delimiter whitespace
func (s *InOut) NextBytes() (r []byte) {
	b, _ := s.ReadByte()
	for b == '\n' || b == ' ' {
		b, _ = s.ReadByte()
	}
	buf := make([]byte, 0)
	for ; b != '\n' && b != ' '; b, _ = s.ReadByte() {
		buf = append(buf, b)
	}
	return buf
}

// Print Strings using the suitable way to change type
func (s *InOut) Print(os ...interface{}) {
	for _, o := range os {
		switch o.(type) {
		case byte:
			s.WriteByte(o.(byte))
		case string:
			s.WriteString(o.(string))
		case int:
			s.WriteString(strconv.Itoa(o.(int)))
		case int64:
			s.WriteString(strconv.FormatInt(o.(int64), 10))
		default:
			s.WriteString(fmt.Sprint(o))
		}
	}
}

// Print Strings using the suitable way to change type with new line
func (s *InOut) Println(os ...interface{}) {
	for _, o := range os {
		s.Print(o)
	}
	s.Print("\n")
}

// Print immediately with new line (for debug)
func (s *InOut) PrintlnNow(o interface{}) {
	fmt.Println(o)
}


package main

import "fmt"

func main() {
    var x, y, z int
    fmt.Scan(&x, &y, &z)
    if (x + y + z)%2 == 1 {
        fmt.Println("Impossible")
        return
    }
    b := (y + z - x)/2
    a := y - b
    c := z - b
    if a < 0 || b < 0 || c < 0 {
        fmt.Println("Impossible")
    } else {
        fmt.Println(a, b, c)
    }
}


package main

import (
	"fmt"
	"io"
)

func main() {
	var x, y, z, g, p, b int
	for {
		if _, err := fmt.Scan(&x, &y, &z, &g, &p, &b); err == io.EOF {
			break
		}
		if x > g || y > g+p-x || z > g+p+b-x-y {
			fmt.Println("NO")
		} else {
			fmt.Println("YES")
		}
	}
}


package main

import (
 "fmt"
)

func main() {
    var x,y,z,a,b,c int;
    fmt.Scan(&x,&y,&z,&a,&b,&c);
		y += x; b+= a;
		z += y; c+= b;
		if a >= x && b >= y && c>=z {
			fmt.Println("YES");
		} else {
			fmt.Println("NO");
		}
}


package main

import "fmt"

func eval(a, d, m, g, p, b int) bool {
	if a > g {
		return false
	}
	g -= a
	if d > (g + p) {
		return false
	}
	rest := g + p - d
	if m > (rest + b) {
		return false
	}
	return true
}

func main() {
	var a, d, m int
	fmt.Scanf("%d %d %d\n", &a, &d, &m)

	var g, p, b int
	fmt.Scanf("%d %d %d\n", &g, &p, &b)

	if eval(a, d, m, g, p, b) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strings"
)

// HelpfulSum sorts numbers in a string in non-increasing order.
func HelpfulSum(s string) string {
	nums := strings.Split(s, "+")
	sort.StringSlice(nums).Sort()
	return strings.Join(nums, "+")
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	fmt.Println(HelpfulSum(scanner.Text()))
}


package main

import "fmt"

func main() {
	var input string
	fmt.Scan(&input)
	record := make([]int, 3)
	for _, ch := range input {
		switch ch{
		case '1':
			record[0] += 1
		case '2':
			record[1] += 1
		case '3':
			record[2] += 1
		default:
			continue
		}
	}
	var prefix bool
	for offset, v := range record {
		if v == 0 {
			continue
		}

		if offset != 0 && prefix {
			fmt.Print("+")
		}

		for i := 0; i < v; i++ {
			fmt.Print(offset + 1)
			if i != v - 1 {
				fmt.Print("+")
			}
		}

		prefix = true
	}
}


package main

import (
	"bufio"
	"fmt"
	"io"
	"math/rand"
	"os"
	"strings"
)

const INF  = 1000000001

type Pair struct {
	first, second int
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}
func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}
func sort(arr []int) []int {
	if len(arr) < 2 {
		return arr
	}
	left := 0
	right := len(arr) - 1
	pivot := rand.Int() % len(arr)

	arr[pivot], arr[right] = arr[right], arr[pivot]

	for i := 0; i < len(arr); i++ {
		if arr[i] < arr[right] {
			arr[i], arr[left] = arr[left], arr[i]
			left++
		}
	}

	arr[left], arr[right] = arr[right], arr[left]

	sort(arr[:left])
	sort(arr[left+1:])
	return arr
}

func solution(reader io.Reader, writer io.Writer) {
	var s string
	fmt.Fscanf(reader, "%s\n", &s)

	a := strings.Split(s, "+")
	b := make([]int, len(a))

	for i := 0; i < len(a); i++ {
		fmt.Sscanf(a[i], "%d", &b[i])
	}

	b = sort(b)

	for i := 0; i < len(b); i++ {
		fmt.Fprintf(writer, "%d", b[i])
		if i < len(b) - 1 {
			fmt.Fprintf(writer, "+")
		}
	}

}

func main() {

	//stdin, err := os.Open("file.in")
	//if err != nil {
	//	panic(err)
	//}
	//defer stdin.Close()
	stdin := os.Stdin
	reader := bufio.NewReaderSize(stdin, 1024*1024)

	//stdout, err := os.Create("file.out")
	//if err != nil {
	//	panic(err)
	//}
	//defer stdout.Close()
	stdout := os.Stdout
	writer := bufio.NewWriterSize(stdout, 1024*1024)
	defer writer.Flush()

	solution(reader, writer)
}


package main

// @snippet <contest.go#0.0.0:header/import.go>
import "fmt"
import "io"
import "os"
import "strings"
import "text/scanner"
// @snippet <contest.go#0.0.0:header/typedef.go>
type Int int64
type IntSlice []Int
// @snippet <contest.go#0.0.0:utils/read.go>
var sc scanner.Scanner

func ReadInt(n *Int) bool {
  tok := sc.Scan()
  if tok != scanner.EOF {
    fmt.Sscan(sc.TokenText(), &n)
    return true
  } else {
    return false
  }
}

func ReadString(s *string) bool {
  tok := sc.Scan()
  if tok != scanner.EOF {
    *s = sc.TokenText()
    return true
  } else {
    return false
  }
}
// @snippet <contest.go#0.0.0:utils/stream.go>
func Stdin() io.Reader {
  return os.Stdin
}

func Strin(s string) io.Reader {
  return strings.NewReader(s)
}
// @snippet <contest.go#0.0.0:main.go>

func min(a rune, b rune) rune {
  if a < b {
    return a
  } else {
    return b
  }
}

func findMin(s string) string {
  res := ""
  for i, c := range s {
    if i == 0 && c == '9' {
      res += "9"
    } else {
      res += string(min(c, '9' - c + '0'))
    }
  }
  return res
}

func main() {
  sc.Init(Stdin())
  var s string
  for ReadString(&s) {
    fmt.Println(findMin(s))
  }
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

func I(i interface{}, delim string) error {
	_, err := fmt.Fscanf(r, "%v"+delim, i)
	return err
}

func O(o interface{}, delim string) {
	fmt.Fprintf(w, "%v"+delim, o)
}

var (
	r *bufio.Reader
	w *bufio.Writer
)

func init() {
	if f, err := os.Open("in.txt"); err == nil {
		r = bufio.NewReader(f)
	} else {
		r = bufio.NewReader(os.Stdin)
	}
	w = bufio.NewWriter(os.Stdout)
}

func main() {
	defer w.Flush()
	var s string
	for I(&s, "\n") == nil {
		solve(s)
	}
}

func solve(s string) {
	a := []byte(s)
	for i := 0; i < len(a); i++ {
		if i != 0 || (i == 0 && a[i] != '9') {
			if a[i] >= '5' {
				a[i] = '0' + '9' - a[i]
			}
		}
	}
	O(string(a), "\n")
}


package main

import "fmt"

func minInvert(t int) int {
	inv := 9 - t
	if t < inv {
		return t
	}
	return inv
}

func main() {
	var S string
	fmt.Scan(&S)
	for i, r := range S {
		t := minInvert(int(r - '0'))
		if i == 0 && t == 0 {
			t = 9
		}
		fmt.Printf("%d", t)
	}
	fmt.Println()
}


package main

/*
	To solve this problem we need to tinker a bit with the mechanism
	of mod & power. If we just use naive approach we will have overflow
	since the number of n is very large.

	So basically in this operation we want to get the remainder of m / (2^n)
	without computing the result of 2^n first.

	So my approach is we divide m with 2 one by one up until n. Thus
	following conditions will happen:
	- if m could be divided completely by all 2s, then the remainder is 0
	  since this means m could be completely divided by 2^n
	- if could not be divided completey by all 2, there are 2 conditions:
	  * the remaining value of m is smaller than remaining 2s, if this happens
		returns m since this means m cannot be divided more by 2. It's just like
		5 / 20, the remainder would be 5, right?
	  * the remaining value of m is bigger than remaining 2s, then we need to get
		the remainder from it, after that multiply with all 2s we already used so
		far then we could get the true remainder for m / (2^n). The example of this
		condition is 42 / (2^4), if we simplify this we will get 21 / (2^3) which
		has remainder 5, notice that the true reminder of 42 / (2^4) is 10 which is
		remainder of (21 / (2^3)) * 2. This yield true for 84 / (2^5) which has true
		reminder 20. So you could already see the connection here.
*/

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	var n, m int64
	stdin := bufio.NewReader(os.Stdin)
	fmt.Fscanf(stdin, "%d\n%d", &n, &m)
	fmt.Println(solve(m, n))
}

func solve(m int64, n int64) int64 {
	tmp := m
	steps := 0
	for tmp%2 == 0 && n > 0 {
		tmp /= 2
		steps++
		n--
	}
	// m is completely divisible by 2^n
	if n == 0 {
		return 0
	}
	// check if tmp is smaller than remaining 2s progressively
	var mul int64 = 1
	for n > 0 {
		mul *= 2
		if mul > tmp {
			// tmp is smaller
			return m
		}
		n--
	}
	// tmp is bigger
	remainder := tmp % mul
	for i := 0; i < steps; i++ {
		remainder *= 2
	}
	return remainder
}


package main

import (
    "fmt"
    "math"
)

func main() {
    var n ,m, result, i float64
    fmt.Scanf("%f\n%f", &n, &m)
    i = math.Pow(2, n)
    result = math.Mod(m, i)
    fmt.Printf("%.0f\n", result)
}


package main

import (
	"fmt"
	"math"
)

func main() {
	var n,m int32
	fmt.Scan(&n,&m)
	if n>=30 {
		fmt.Print(m)
	}else{
		fmt.Print(m % int32((math.Pow(2.0,float64(n)))))
	}
}


package main

import (
  "fmt"
)

func main() {
  m,num := make(map[int]bool),0
  for i := 0 ; i < 4 ; i++ {
    fmt.Scan(&num)
    m[num] = true
  }
  fmt.Println(4 - len(m))
}


package main

import "fmt"

func main() {
	var num int
	var numMap map[int]int
	var buy int

	buy = 0
	numMap = make(map[int]int, 4)

	for i := 0; i < 4; i++ {
		fmt.Scanf("%d", &num)
		numMap[num]++
		if numMap[num] > 1 {
			buy++
		}
	}
	fmt.Println(buy)
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	in := bufio.NewReader(os.Stdin)
	xm := make(map[uint32]uint32)
	var s1, s2, s3, s4 uint32

	fmt.Fscanf(in, "%d %d %d %d\n", &s1, &s2, &s3, &s4)

	xm[s1] = s1
	xm[s2] = s2
	xm[s3] = s3
	xm[s4] = s4

	fmt.Println(4 - len(xm))
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

var reader = bufio.NewReader(os.Stdin)
var writer = bufio.NewWriter(os.Stdout)

func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }
func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }

func main() {
	defer writer.Flush()

	var h1, m1, h2, m2 int
	scanf("%d:%d\n%d:%d\n", &h1, &m1, &h2, &m2)
	m := ((h1+h2)*60 + m1 + m2) / 2
	printf("%02d:%02d\n", m/60, m%60)
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)

var reader = bufio.NewReader(os.Stdin)
var writer = bufio.NewWriter(os.Stdout)

func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }
func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }

func getLine() string {
	s, _ := reader.ReadString('\n')
	if strings.HasSuffix(s, "\r\n") {
		s = s[:len(s)-2]
	} else if strings.HasSuffix(s, "\n") {
		s = s[:len(s)-1]
	}
	return s
}

func main() {
	defer writer.Flush()

	var h1, m1, h2, m2 int
	scanf("%d:%d\n%d:%d\n", &h1, &m1, &h2, &m2)
	m := ((h1+h2)*60 + m1 + m2) / 2
	printf("%02d:%02d\n", m/60, m%60)
}


package  main
import ("fmt")

func max(x,y int) int {
   if (x>y){
   	return x
   } else{
   	return y
   }
}

func min(x,y int) int {
   if (x<y){
   	return x
   } else{
   	return y
   }
}

func abs(x int) int{
	if(x <0){
		x = -1*x
	}

	return x
}
func main(){
	var n int
	//fmt.Print(abs(-30))

	fmt.Scan(&n)
	var s string
	fmt.Scan(&s)
	l := len(s)
    ans :=100000
	for i:=0 ;i<l-3;i++ {
		var p int
		p =0
		//fmt.Println(abs(int(s[i]-'A')))
		b := int(s[i])

		p+= min(26- abs(b-65) , abs(b-65)) ;
		b = int(s[i+1])

    	p+= min(26- abs(b-67) , abs(b-67)) ;
    	b = int(s[i+2])
    	p+= min(26- abs(b-84) , abs(b-84)) ;
    	b = int(s[i+3])
    	p+= min(26- abs(b-71) , abs(b-71)) ;
    	ans = min(p,ans);

	}
	fmt.Print(ans)

}


package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	n := 0
	fmt.Fscanf(in, "%d\n", &n)
	s := ""
	fmt.Fscanf(in, "%s\n", &s)
	ans := 26 * 4
	for i := 0; i < len(s)-3; i++ {
		tmp := try(s[i : i+4])
		if tmp < ans {
			ans = tmp
		}
	}
	fmt.Fprintf(out, "%d\n", ans)
	return
}

func try(s string) int {
	ans := 0
	ans += minstep(s[0], 'A')
	ans += minstep(s[1], 'C')
	ans += minstep(s[2], 'T')
	ans += minstep(s[3], 'G')
	return ans
}

func minstep(a, b byte) int {
	return min(int(a-b+26)%26, int(b-a+26)%26)
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}


package  main
import ("fmt")

func max(x,y int) int {
   if (x>y){
   	return x
   } else{
   	return y
   }
}

func min(x,y int) int {
   if (x<y){
   	return x
   } else{
   	return y
   }
}

func abs(x int) int{
	if(x <0){
		x = -1*x
	}

	return x
}
func main(){
	var n int
	//fmt.Print(abs(-30))

	fmt.Scan(&n)
	var s string
	fmt.Scan(&s)
	l := len(s)
    ans :=100000
	for i:=0 ;i<l-3;i++ {
		var p int
		p =0
		//fmt.Println(abs(int(s[i]-'A')))
		b := int(s[i])

		p+= min(26- abs(int(b-65)) , abs(int(b-65)))
		b = int(s[i+1])

    	p+= min(26- abs(int(b-67)) , abs(int(b-67)))
    	b = int(s[i+2])
    	p+= min(26- abs(int(b-84)) , abs(int(b-84)))
    	b = int(s[i+3])
    	p+= min(26- abs(int(b-71)) , abs(int(b-71)))
    	ans = min(p,ans);

	}
	fmt.Print(ans)

}


package main

import "fmt"

func f(a,b,c int) int {
    if ((a+b) > c) && ((a+c) > b) && ((b+c) > a) {
        return 2
    } else if ((a+b) >= c) && ((a+c) >= b) && ((b+c) >= a) {
        return 1
    } else {
        return 0
    }
}

func max(a... int) (max int) {
    max = a[0]
    for _, v := range a {
        if max < v { max = v }
    }
    return
}

func main() {
    var a,b,c,d int
    fmt.Scan(&a,&b,&c,&d)
    ans := max(f(a,b,c),f(a,b,d),f(a,c,d),f(b,c,d))
    if ans == 2 {
        fmt.Println("TRIANGLE")
    } else if ans == 1 {
        fmt.Println("SEGMENT")
    } else {
        fmt.Println("IMPOSSIBLE")
    }
}


package main

import (
	"fmt"
)

func main() {
	var l [4]int
	if _, err := fmt.Scanf("%d %d %d %d\n", &l[0], &l[1], &l[2], &l[3]); err != nil {
		return
	}

	segment := false

	var t [3]int
	for i := 0; i < 4; i++ {
		k := 0
		for j := 0; j < 4; j++ {
			if j != i {
				t[k] = l[j]
				k++
			}
		}
		s := triangle(t)
		if s == 1 { // triangle
			fmt.Println("TRIANGLE")
			return
		} else if s == 2 { // Degenerate triangle
			segment = true
		}
	}

	if segment {
		fmt.Println("SEGMENT")
	} else {
		fmt.Println("IMPOSSIBLE")
	}
}

func triangle(t [3]int) int {
	sum := 0
	max := 0
	for i := 0; i < 3; i++ {
		sum += t[i]
		if t[i] > max {
			max = t[i]
		}
	}

	if sum-max == max {
		return 2
	} else if sum-max > max {
		return 1
	} else {
		return 0
	}
}


package main

import "fmt"
import "sort"

func triangle(L []int, diff int) bool {
	for i := 0; i < 4; i++ {
		for j := i + 1; j < 4; j++ {
			for k := j + 1; k < 4; k++ {
				if (L[i] + L[j] - L[k]) >= diff {
					return true
				}
			}
		}
	}
	return false
}

func main() {
	var L = make([]int, 4)
	_, _ = fmt.Scanf("%d %d %d %d", &L[0], &L[1], &L[2], &L[3])
	sort.Ints(L)
	if triangle(L, 1) {
		fmt.Println("TRIANGLE")
	} else if triangle(L, 0) {
		fmt.Println("SEGMENT")
	} else {
		fmt.Println("IMPOSSIBLE")
	}
}


/*
URL:
https://codeforces.com/problemset/problem/1068/B
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	b int64
)

func main() {
	b = ReadInt64()

	memo := Divisors(b)
	fmt.Println(len(memo))
}

// Divisors returns the divisors of an argument integer as map[int]int.
func Divisors(n int64) map[int64]int64 {
	var l int64
	res := make(map[int64]int64)

	for l = 1; l*l <= n; l++ {
		if n%l == 0 {
			res[l] = 1
			res[n/l] = 1
		}
	}

	return res
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}


package main

import (
	"fmt"
	"math"
)

func main() {
	var b, res int64 = 0, 1
	fmt.Scan(&b)
	if b > 1 {
		// Count 1 and b itself.
		res++
		// Why Ceil instead of Floor? Example: 12
		sqrtB := int64(math.Ceil(math.Sqrt(float64(b))))
		if sqrtB*sqrtB == b {
			res++
		}

		for i := int64(2); i < sqrtB; i++ {
			if b%i == 0 {
				res += 2
			}
		}
	}
	fmt.Println(res)
}


package main

import (
  "fmt"
  "bufio"
  "os"
  "math"
)

var (
  in *bufio.Reader
  out *bufio.Writer
)

func main() {
  in = bufio.NewReader(os.Stdin)
  out = bufio.NewWriter(os.Stdout)
  var b int64
  fmt.Fscanln(in, &b)
  var count int64 = 0
  for  i:=int64(1);i<=int64(math.Sqrt(float64(b)));i++ {
    if (b%i == 0) {
      if (i*i == b) {
        count++
      } else {
        count+=2
      }
    }
  }
  fmt.Println(count)
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	var (
		a, b, x, y int64
	)

	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)

	scanner.Scan()
	a, _ = strconv.ParseInt(scanner.Text(), 10, 64)

	scanner.Scan()
	b, _ = strconv.ParseInt(scanner.Text(), 10, 64)

	scanner.Scan()
	x, _ = strconv.ParseInt(scanner.Text(), 10, 64)

	scanner.Scan()
	y, _ = strconv.ParseInt(scanner.Text(), 10, 64)

	g := gcd(x, y)

	x /= g
	y /= g

	f, s := a/x, b/y

	res := min(f, s)
	fmt.Println(res)
}

func min(x, y int64) int64 {
	if x < y {
		return x
	}

	return y
}

func gcd(a, b int64) int64 {
	for b != 0 {
		a %= b
		a, b = b, a
	}
	return a
}

func lcm(a, b int64) int64 {
	return a / gcd(a, b) * b
}


package main

import "fmt"

func gcd(a, b uint64) uint64 {
	if b == 0 {
		return a
	}
	return gcd(b, a%b)
}

func main() {
	var a, b, x, y uint64
	fmt.Scanf("%d %d %d %d", &a, &b, &x, &y)

	d := gcd(x, y)
	x /= d
	y /= d

	if a/x > b/y {
		fmt.Println(b / y)
		return
	}

	fmt.Println(a / x)
}


package main

import (
	"fmt"
	"bufio"
	"os"
	"strconv"
)
var (
	r *bufio.Scanner
	w *bufio.Writer
)

const ISDEBUG = false

func readLine() string {
	r.Scan()
	return r.Text()
}

func readInt() int {
	r.Scan()
	x, _ := strconv.Atoi(r.Text())
	return x
}

func readInts(n int) []int {
	var res []int
	for i:=0; i<n; i++ {
		if !r.Scan() {
			fmt.Println(r.Err())
		}
		x, _ := strconv.Atoi(r.Text())
		res = append(res, x)
	}
	return res
}

func readInt64() int64 {
	r.Scan()
	x, _ := strconv.ParseInt(r.Text(), 10, 64)
	return x
}

func gcd(x, y int64) int64{
	if y == 0 {
		return x
	}
	return gcd(y, x % y)
}

func buytv() int64 {
	a, b, x, y := readInt64(), readInt64(), readInt64(), readInt64()

	gxy := gcd(x, y)
	x = x / gxy
	y = y / gxy

	r1, r2 := a/x, b/y
	if r1 < r2 {
		return r1
	}
	return r2
}

func main() {
	if ISDEBUG {
		fi, err := os.Open("input.txt")
		if err != nil {
			panic(err)
		}
		fo, _ := os.OpenFile("output.txt", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755)
		r = bufio.NewScanner(fi)
		w = bufio.NewWriter(fo)

		defer fi.Close()
		defer fo.Close()
	} else {
		r = bufio.NewScanner(os.Stdin)
		w = bufio.NewWriter(os.Stdout)
	}
	r.Split(bufio.ScanWords)
	defer w.Flush()

	w.WriteString(fmt.Sprintf("%v\n",buytv()))
}


package main

import "fmt"

func min(a,b int) int { if a < b { return a } else { return b } }

func main() {
    var r,g,b int
    ok := false
    fmt.Scan(&r,&g,&b)
    ans := min(r,min(g,b))
    if ans > 0 { ok = true }
    r -= ans; g -= ans; b -= ans;
    ans += r/3; ans += g/3; ans += b/3
    if ok && (((r%3 == 2) && (g%3 == 2)) || ((r%3 == 2) && (b%3 == 2)) || ((g%3 == 2) && (b%3 == 2))) {
        ans++
    }
    fmt.Println(ans)
}


// Author: sighduck
// URL: https://codeforces.com/problemset/problem/322/B

package main

import (
	"bufio"
	"fmt"
	"os"
)

func min(arr []int64) int64 {
	minElem := arr[0]
	for _, elem := range arr {
		if elem < minElem {
			minElem = elem
		}
	}
	return minElem
}

func Solve(r, g, b int64) int64 {
	result := int64(0)
	m := min([]int64{r, g, b})
	for i := int64(0); i <= min([]int64{2, m}); i++ {
		curr := i + (r-i)/3 + (b-i)/3 + (g-i)/3
		if curr > result {
			result = curr
		}
	}
	return result
}

func main() {
	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	var r, g, b int64
	fmt.Fscanf(reader, "%d %d %d\n", &r, &g, &b)

	fmt.Fprintf(writer, "%d\n", Solve(r, g, b))
}


package main

import (
	"fmt"
)

func main() {
	var t int
	fmt.Scan(&t)
	var x, a, b, c int
	for ; t > 0; t-- {
		fmt.Scan(&x)
		fmt.Scan(&a, &b, &c)
		switch v := a + b + c; {
		case a == 1 || b == 2 || c == 3:
			fmt.Println("NO")
		case v == 3 && c == 0:
			fmt.Println("NO")
		case v == 4 && b == 0:
			fmt.Println("NO")
		case v == 5 && a == 0:
			fmt.Println("NO")
		default:
			fmt.Println("YES")
		}
	}
}


package main

import (
	"fmt"
)

func main() {

	var j int

	fmt.Scan(&j)

	for z := 0; z < j; z++ {
		var key int

		fmt.Scan(&key)

		var doors [3]int

		for i := 0; i < 3; i++ {
			fmt.Scan(&doors[i])
		}

		opened := 3

		var answer bool = true

		for opened > 0 {
			key = doors[key-1]
			opened--

			if (key == 0) && (opened > 0) {
				answer = false
				break
			}
		}

		switch answer {
		case true:
			fmt.Println("YES")

		case false:
			fmt.Println("NO")
		}
	}

}


package main

import "fmt"

func main() {

	var t int
	if _, err := fmt.Scanf("%d\n", &t); err != nil {
		fmt.Println("err1")
		return
	}

	var x int
	key := make([]int, 4)

	for i := 0; i < t; i++ {
		if _, err := fmt.Scanf("%d\n%d%d%d\n", &x, &key[1], &key[2], &key[3]); err != nil {
			fmt.Println("err2")
			return
		}

		if key[1] == 1 || key[2] == 2 || key[3] == 3 {
			fmt.Println("NO")
		} else if key[x] == 0 || key[key[x]] == 0 {
			fmt.Println("NO")
		} else {
			fmt.Println("YES")
		}

	}

	return
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

func I(i ...interface{}) error {
	_, err := fmt.Fscan(r, i...)
	return err
}

func O(o ...interface{}) {
	fmt.Fprint(w, o...)
}

var (
	r *bufio.Reader
	w *bufio.Writer
)

func init() {
	if f, err := os.Open("in.goC"); err == nil {
		r = bufio.NewReader(f)
	} else {
		r = bufio.NewReader(os.Stdin)
	}
	w = bufio.NewWriter(os.Stdout)
}

func main() {
	var n int
	for I(&n) == nil {
		solve(n)
	}
	w.Flush()
}

func solve(n int) {
	a := 1
	b := n
	ans := 0
	for a < b {
		o := (a + b) % (n + 1)
		if o == 0 {
			a++
		} else {
			b--
			ans++
		}
	}
	O(ans, "\n")
}


package main

import (
	"bufio"
	"bytes"
	"fmt"
	"os"
)

func Solve(io *FastIO) {
	io.Println((io.NextInt() - 1) / 2)
}

type FastIO struct {
	reader *bufio.Reader
	writer *bufio.Writer
}

func (io *FastIO) NextChar() byte {
	c, _ := io.reader.ReadByte()
	return c
}

func (io *FastIO) NextInt() int {
	c := io.NextChar()
	for IsSpaceChar(c) {
		c = io.NextChar()
	}
	sgn := 1
	if c == '-' {
		sgn = -1
		c = io.NextChar()
	}
	res := 0
	for !IsSpaceChar(c) {
		res = (res * 10) + int(c - '0')
		c = io.NextChar()
	}
	return sgn * res
}

func (io *FastIO) NextLong() int64 {
	c := io.NextChar()
	for IsSpaceChar(c) {
		c = io.NextChar()
	}
	sgn := int64(1)
	if c == '-' {
		sgn = -1
		c = io.NextChar()
	}
	res := int64(0)
	for !IsSpaceChar(c) {
		res = (res * 10) + int64(c - '0')
		c = io.NextChar()
	}
	return sgn * res
}

func (io *FastIO) NextIntArray(size int) []int {
	return io.NextIntArrayOffset(size, 0)
}

func (io *FastIO) NextIntArrayOffset(size, offset int) []int {
	arr := make([]int, size + offset)
	for i := 0; i < size; i++ {
		arr[i + offset] = io.NextInt()
	}
	return arr
}

func (io *FastIO) NextLongArray(size int) []int64 {
	return io.NextLongArrayOffset(size, 0)
}

func (io *FastIO) NextLongArrayOffset(size, offset int) []int64 {
	arr := make([]int64, size + offset)
	for i := 0; i < size; i++ {
		arr[i + offset] = io.NextLong()
	}
	return arr
}

func (io *FastIO) NextString() string {
	c := io.NextChar()
	for (IsSpaceChar(c)) {
		c = io.NextChar()
	}
	var sb bytes.Buffer
	for !IsSpaceChar(c) {
		sb.WriteByte(c)
		c = io.NextChar()
	}
	return sb.String()
}

func (io *FastIO) NextLine() string {
	c := io.NextChar()
	for (IsSpaceChar(c)) {
		c = io.NextChar()
	}
	var sb bytes.Buffer
	for !IsLineBreakChar(c) {
		sb.WriteByte(c)
		c = io.NextChar()
	}
	return sb.String()
}

func (io *FastIO) Println(args ...interface{}) {
	io.writer.WriteString(fmt.Sprintln(args...))
}

func (io *FastIO) Printf(format string, args ...interface{}) {
	io.writer.WriteString(fmt.Sprintf(format, args...))
}

func (io *FastIO) FlushOutput() {
	io.writer.Flush()
}

func IsSpaceChar(c byte) bool {
	switch c {
	case 0, '\t', '\n', '\r', ' ':
		return true
	default:
		return false
	}
}

func IsLineBreakChar(c byte) bool {
	switch c {
		case 0, '\n', '\r':
			return true
		default:
			return false
	}
}

func main() {
	io := FastIO{reader: bufio.NewReader(os.Stdin), writer: bufio.NewWriter(os.Stdout)}
	Solve(&io)
	io.FlushOutput()
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func solve() {
	n := readInt()
	var ans int
	if n%2 == 0 {
		ans = n/2 - 1
	} else {
		ans = n / 2
	}
	fmt.Println(ans)
}

var scanner *bufio.Scanner

func main() {
	scanner = bufio.NewScanner(os.Stdin)
	const MaxTokenLength = 1024 * 1024
	scanner.Buffer(make([]byte, 0, MaxTokenLength), MaxTokenLength)
	scanner.Split(bufio.ScanWords)
	solve()
}

// IO

func readString() string {
	scanner.Scan()
	return scanner.Text()
}

func readInt() int {
	val, _ := strconv.Atoi(readString())
	return val
}

func readInt64() int64 {
	v, _ := strconv.ParseInt(readString(), 10, 64)
	return v
}

func readIntArray(sz int) []int {
	a := make([]int, sz)
	for i := 0; i < sz; i++ {
		a[i] = readInt()
	}
	return a
}

func readInt64Array(n int) []int64 {
	res := make([]int64, n)
	for i := 0; i < n; i++ {
		res[i] = readInt64()
	}
	return res
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}


package main
import 	"fmt"

func main(){
	var m,n,temp,a int64
    fmt.Scanf("%d", &m)
	fmt.Scanf("%d", &n)
	fmt.Scanf("%d", &a)
	temp = (m+a-1)/a
	temp *= (n+a-1)/a
	fmt.Println(temp)
}


package main

import (
	"fmt"
	"math"
	"os"
)

func main(){
	var m,n,a int
	_,er1 := fmt.Scan(&m)
	_,er2 := fmt.Scan(&n)
	_,er3 := fmt.Scan(&a)
	if er1 != nil || er2 != nil|| er3 != nil {
		os.Exit(1)
	}
	mTiles := uint64(math.Ceil( float64(m) / float64(a)))
	nTiles := uint64(math.Ceil( float64(n) / float64(a)))
	fmt.Print(mTiles * nTiles)
}


package main

import "fmt"

func main() {
	var n, m, a int64
	fmt.Scan(&n, &m, &a)
	fmt.Print(((n + a - 1) / a) * ((m + a - 1) / a))
}


// cf999a project main.go
package main

import (
	"fmt"
)

func main() {
	var n, s int
	fmt.Scan(&n, &s)
	m := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Scan(&m[i])
	}
	c := 0
	l, r := 0, n-1
	for i := 0; i < n && l <= r; i++ {

		if m[l] <= s {
			c++
			l++
		}
		if m[r] <= s && l < r {
			c++
			r--
		}

	}
	fmt.Println(c)
}


package main
import "fmt"
func main() {
	var n, k int
	fmt.Scan(&n,&k)
	a := make([]int,n)
	for i:=0;i<n;i++ {
		fmt.Scan(&a[i])
	}
	r := 0
	for i:=0;i<n;i++ {
		if a[i]<=k {
			r++
		} else {
			break;
		}
	}
	if r < n {
		for i:=n-1;i>=0;i-- {
			if a[i]<=k {
				r++
			} else {
				break;
			}
		}
	}
	fmt.Print(r)
}


package main

import "fmt"

func main() {
	var n, k, l int
	fmt.Scan(&n, &k)
	a := make([]int, n)
	for i := range a {
		fmt.Scan(&a[i])
	}
	for len(a) > 0 && a[0] <= k {
		l++
		a = a[1:]
	}
	for len(a) > 0 && a[len(a)-1] <= k {
		a = a[0 : len(a)-1]
		l++
	}
	fmt.Println(l)
}


package main

import "fmt"

var mmap = make(map[uint8][]string)

func recur(str string, l int) int {
	if l == 0 {
		return 1
	}
	if l < 0 {
		return 0
	}
	ret := 0
	for _, s := range mmap[str[0]] {
		ret += recur(s+str[1:], l-1)
	}
	return ret
}

func main() {
	var n, q int
	fmt.Scanf("%d %d\n", &n, &q)
	for i := 0; i < q; i++ {
		var k, v string
		fmt.Scanf("%s %s\n", &k, &v)
		ks := v[0]
		mmap[ks] = append(mmap[ks], k)
	}
	fmt.Print(recur("a", n-1))
}


package main

import (
	"bufio"
	"bytes"
	"fmt"
	"os"
)

func Init() {
}

func Solve(io *FastIO) {
	N := io.NextInt()
	S := io.NextLine()

	freq := make(map[string]int)
	best := ""
	for i := 2; i <= N; i++ {
		k := S[i-2:i]
		freq[k]++
		if freq[k] > freq[best] {
			best = k
		}
	}
	io.Println(best)
}

type FastIO struct {
	reader *bufio.Reader
	writer *bufio.Writer
}

func (io *FastIO) NextChar() byte {
	c, _ := io.reader.ReadByte()
	return c
}

func (io *FastIO) NextInt() int {
	c := io.NextChar()
	for IsSpaceChar(c) {
		c = io.NextChar()
	}
	sgn := 1
	if c == '-' {
		sgn = -1
		c = io.NextChar()
	}
	res := 0
	for !IsSpaceChar(c) {
		res = (res * 10) + int(c - '0')
		c = io.NextChar()
	}
	return sgn * res
}

func (io *FastIO) NextLong() int64 {
	c := io.NextChar()
	for IsSpaceChar(c) {
		c = io.NextChar()
	}
	sgn := int64(1)
	if c == '-' {
		sgn = -1
		c = io.NextChar()
	}
	res := int64(0)
	for !IsSpaceChar(c) {
		res = (res * 10) + int64(c - '0')
		c = io.NextChar()
	}
	return sgn * res
}

func (io *FastIO) NextIntArray(size int) []int {
	return io.NextIntArrayOffset(size, 0)
}

func (io *FastIO) NextIntArrayOffset(size, offset int) []int {
	arr := make([]int, size + offset)
	for i := 0; i < size; i++ {
		arr[i + offset] = io.NextInt()
	}
	return arr
}

func (io *FastIO) NextLongArray(size int) []int64 {
	return io.NextLongArrayOffset(size, 0)
}

func (io *FastIO) NextLongArrayOffset(size, offset int) []int64 {
	arr := make([]int64, size + offset)
	for i := 0; i < size; i++ {
		arr[i + offset] = io.NextLong()
	}
	return arr
}

func (io *FastIO) NextString() string {
	c := io.NextChar()
	for (IsSpaceChar(c)) {
		c = io.NextChar()
	}
	var sb bytes.Buffer
	for !IsSpaceChar(c) {
		sb.WriteByte(c)
		c = io.NextChar()
	}
	return sb.String()
}

func (io *FastIO) NextLine() string {
	c := io.NextChar()
	for (IsSpaceChar(c)) {
		c = io.NextChar()
	}
	var sb bytes.Buffer
	for !IsLineBreakChar(c) {
		sb.WriteByte(c)
		c = io.NextChar()
	}
	return sb.String()
}

func (io *FastIO) Println(args ...interface{}) {
	io.writer.WriteString(fmt.Sprintln(args...))
}

func (io *FastIO) Printf(format string, args ...interface{}) {
	io.writer.WriteString(fmt.Sprintf(format, args...))
}

func (io *FastIO) FlushOutput() {
	io.writer.Flush()
}

func IsSpaceChar(c byte) bool {
	switch c {
	case 0, '\t', '\n', '\r', ' ':
		return true
	default:
		return false
	}
}

func IsLineBreakChar(c byte) bool {
	switch c {
		case 0, '\n', '\r':
			return true
		default:
			return false
	}
}

func main() {
	io := FastIO{reader: bufio.NewReader(os.Stdin), writer: bufio.NewWriter(os.Stdout)}
	Init()
	Solve(&io)
	io.FlushOutput()
}


package main

import."fmt"

// github.com/EndlessCheng/codeforces-go
func main() {
	n,s,m:=0,"",""
	Scan(&n,&s)
	c := map[string]int{}
	for i := 2; i <= n; i++ {
		t:=s[i-2:i]
		if c[t]++;c[t]>c[m] {
			m=t
		}
	}
	Print(m)
}


package main

import (
    "bufio"
    "os"
    "fmt"
)

func main() {
    reader := bufio.NewReader(os.Stdin)
    _, _ = reader.ReadString('\n')
    input, _ := reader.ReadString('\n')

    ma := make(map[string]int)
    ar := []string{}
    for i, c := range input {
        if i == len(input) - 1 {
            break
        }

        cu := string(c) + string(input[i + 1])
        ar = append(ar, cu)

        if _, ok := ma[cu]; ok {
            ma[cu] += 1
        } else {
            ma[cu] = 1
        }
    }

    max := -999999999
    ret := ar[0]
    for _, m := range ar {
        if ma[m] > max {
            max = ma[m]
            ret = m
        }
    }

    fmt.Println(ret)
}


package main

import (
	"fmt"
)

func main() {
	var n, x int32
	fmt.Scanf("%d %d\n", &n, &x)

	ans := int32(0)
	for i := int32(1); i*i <= x; i++ {
		if x%i == 0 {
			result := x / i
			if result <= n {
				ans += 2
				if result == i {
					ans--
				}
			}
		}
	}
	fmt.Println(ans)
}


package main

import (
    "fmt"
    )

func main() {
    var n, x, i uint
    fmt.Scan(&n, &x)

    result := 0
    for i = 1; i <= n; i++ {
        if x % i == 0 && x / i <= n {
            result++
        }
    }

    fmt.Println(result)
}


package main

import (
	"fmt"
	"os"
	"bufio"
)

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func scanf(f string, a... interface{}) {
	fmt.Fscanf(reader, f, a...)
}

func printf(f string, a... interface{}) {
	fmt.Fprintf(writer, f, a...)
}

func main() {
	var T, x, result, i, j uint64
	scanf("%d %d\n", &T, &x)

	result = 0

	if x <= T {
		result++
	}
	for i=2; i<=T; i++ {
		if x % i == 0 {
			for j=1; j<=T; j++ {
				if x == i * j {
					result++
				}
			}

		}
	}

	fmt.Println(result)

}


package main

import (
	"fmt"
)

func canDeal(a, b, c int, checked map[int]bool) bool {
	if c < a && c < b {
		return false
	}
	if c%a == 0 || c%b == 0 {
		return true
	}
	defer func() { checked[c] = true }()
	if !checked[c] {
		return canDeal(a, b, c-a, checked) || canDeal(a, b, c-b, checked)
	}
	return false
}

func main() {
	var a, b, c int
	fmt.Scan(&a, &b, &c)
	checked := make(map[int]bool, c)
	if canDeal(a, b, c, checked) {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}


package main

import "fmt"

func main() {
	var a, b, c int
	fmt.Scan(&a, &b, &c)

	for i := 0; i <= 10000; i++ {
		if (c-i*b)%a == 0 && (c-i*b)/a >= 0 {
			fmt.Printf("Yes\n")
			return
		}
	}

	fmt.Printf("No\n")
}


package main

import "fmt"

func main() {
	var a, b, c int
	fmt.Scan(&a, &b, &c)

	ans := false
	for x := 0; a*x <= c; x++ {
		if (c-a*x)%b == 0 {
			ans = true
			break
		}
	}

	if ans {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}


package main

import "fmt"

func main() {
	var n, k int
	fmt.Scan(&n, &k)

	var arr = make([]int, n)
	var count int

	for i:=0; i < n ; i++ {
		fmt.Scan(&arr[i])
	}

	for _, value := range arr{
		if value >= arr[k-1] && value != 0 {
			count++
		}
	}

	fmt.Println(count)
}


package main

import (
	"fmt"
)

func main() {
	var n, k int
	fmt.Scanf("%d %d\n", &n, &k)

	var participants []int = make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Scanf("%d", &participants[i])
	}

	var kthScore int = participants[k-1]

	var count int = 0

	for _, element := range participants {
		if element >= kthScore && (element != 0) {
			count++
		}
	}

	fmt.Println(count)
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

// CalcAdvancers returns the number of advancers to the next round.
func CalcAdvancers(n, k int, ranks []int) int {
	pos := k - 1
	pts := ranks[pos]
	next := func(in int) int { return in + 1 }
	prev := func(in int) int { return in - 1 }
	if pts == 0 {
		next, prev = prev, next
	}

	for pos >= 0 && pos < n {
		if ranks[pos] < pts {
			return pos
		}
		if pts == 0 && ranks[pos] > pts {
			return pos + 1
		}
		pos = next(pos)
	}

	if pos < 0 {
		return 0
	}

	return pos
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)

	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	scanner.Scan()
	k, _ := strconv.Atoi(scanner.Text())

	ranks := make([]int, 0)
	for scanner.Scan() {
		next, _ := strconv.Atoi(scanner.Text())
		ranks = append(ranks, next)
	}

	fmt.Printf("%d\n", CalcAdvancers(n, k, ranks))
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)

var reader = bufio.NewReader(os.Stdin)
var writer = bufio.NewWriter(os.Stdout)

func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }
func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }

func getLine() string {
	s, _ := reader.ReadString('\n')
	if strings.HasSuffix(s, "\r\n") {
		s = s[:len(s)-2]
	} else if strings.HasSuffix(s, "\n") {
		s = s[:len(s)-1]
	}
	return s
}
func getLine2Int() (n int) {
	scanf("%d\n", &n)
	return
}
func getLine2Int2() (a, b int) {
	scanf("%d %d\n", &a, &b)
	return
}

var debug = false

func see(a interface{}) {
	if debug {
		printf("DEBUG:%v\n", a)
	}
}

func main() {
	defer writer.Flush()

	n, m := getLine2Int2()
	result := 1
	if result < m {
		result = m
	}
	n -= m
	if result > n {
		result = n
	}
	printf("%d\n", result)
}


package main

import (
	"fmt"
	"math"
)

func main() {
	var n, m float64
	fmt.Scanf("%f %f", &n, &m)

	if m == 0 {
		fmt.Print(1)
		return
	}
	fmt.Print(int(math.Min(m, n-m)))
}


package main

import "fmt"

func main() {
    var n, m int
    fmt.Scanf("%d %d",&n, &m)
    res := 1
    if m <= 1 {
        res = 1
    } else {
        if m <= n/ 2 {
            res = m
        } else {
            res = n / 2
            if n % 2 == 1 {
                n--;
                m--;
            }
            res -= m - n / 2
        }
    }
    fmt.Println(res)
}


package main

import (
	"bufio"
	"os"
	"strconv"
)

var writer *bufio.Writer
var scanner *bufio.Scanner

type MySlice [][2]int

func (slice MySlice) Len() int           { return len(slice) }
func (slice MySlice) Less(i, j int) bool { return slice[i][1] < slice[j][1] }
func (slice MySlice) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}

func main() {
	ini()
	defer writer.Flush()

	d1 := scanInt()
	d2 := scanInt()
	d3 := scanInt()

	result := min(d1 + d2 + d3, min(2 * (d1 + d2), min(2 * (d2 + d3), 2 * (d1 + d3))))
	writer.WriteString(strconv.Itoa(result))

	return
}

func binSearch(a []int, key int) int {
	l := -1
	r := len(a)
	for l < r-1 {
		m := (l + r) / 2
		if a[m] < key {
			l = m
		} else {
			r = m
		}
	}

	if a[r] != key {
		return -1
	}

	return r
}

func ini() {
	scanner = bufio.NewScanner(os.Stdin)
	writer = bufio.NewWriter(os.Stdout)
	scanner.Split(bufio.ScanWords)
}

func min(a int, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}

func scanInt() int {
	scanner.Scan()
	i, _ := strconv.Atoi(scanner.Text())
	return i
}

func scanString() string {
	scanner.Scan()
	return scanner.Text()
}


package main

import (
	"fmt"
	"sort"
)

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func main() {
	d := []int{0, 0, 0}
	fmt.Scanf("%d %d %d \n", &d[0], &d[1], &d[2])
	sort.Ints(d)
	r := d[0] + d[1] + min(d[2], d[0]+d[1])
	fmt.Print(r)
}


package main

import "fmt"

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func main() {
	var d1, d2, d3 int
	fmt.Scanf("%d %d %d", &d1, &d2, &d3)

	ret := min(d1 + min(d1 + 2 * d2, d3 + min(d2, d3 + d1)),
			   d2 + min(d2 + 2 * d1, d3 + min(d1, d3 + d2)))
	fmt.Printf("%d", ret)
}


package main

import (
	"fmt"
	"strings"
)

func main() {
	var line, answer string
	fmt.Scanln(&line)
	var allUpper bool = strings.ToUpper(line[1:]) == line[1:]
	if (allUpper) {
		if line[:1] == strings.ToUpper(line[:1]) {
			answer = strings.ToLower(line)
		} else {
			answer = strings.ToUpper(line[:1]) + strings.ToLower(line[1:])
		}
	} else {
		answer = line
	}
	fmt.Println(answer)
}


package main

import (
	"bytes"
	"fmt"
	"strings"
	"unicode"
)

func main() {
	var s string
	fmt.Scan(&s)
	var ok = true
	for i := 1; i < len(s); i++ {
		if 'a' <= s[i] && s[i] <= 'z' {
			ok = false
			break
		}
	}
	if ok {
		var buffer bytes.Buffer
		if 'a' <= s[0] && s[0] <= 'z' {
			buffer.WriteRune(unicode.ToUpper(rune(s[0])))
		} else {
			buffer.WriteRune(unicode.ToLower(rune(s[0])))
		}

		buffer.WriteString(strings.ToLower(s[1:]))
		fmt.Print(buffer.String())
		return
	}
	fmt.Print(s)
}


package main

import (
    "fmt"
    "strings"
)

func isCaps(c byte) bool {
    return c >= 'A' && c <= 'Z'
}

func main() {
    var s string
    fmt.Scan(&s)

    rule1, rule2 := false, true
    if !isCaps(s[0]) {
        rule1 = true
    }

    for i, _ := range s {
        if i == 0 {
            continue
        }
        if !isCaps(s[i]) {
            rule2 = false
        }
    }
    if rule1 && rule2 {
        fmt.Println(strings.Title(strings.ToLower(s)))
        return
    }
    if rule2 {
        fmt.Println(strings.ToLower(s))
        return
    }
    fmt.Println(s)
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	// STDOUT MUST BE FLUSHED MANUALLY!!!
	defer writer.Flush()

	var a, b, r int
	scanf("%d %d\n", &a, &b)
	for a < b+1 {
		a = a * 3
		b = b * 2
		r++
	}
	//CODE HERE
	printf("%d\n", r)
}


package main

import (
	"fmt"
)

func main() {
	var limanWeight, bobWeight int
	fmt.Scan(&limanWeight)
	fmt.Scan(&bobWeight)
	var yearsCount int
	for limanWeight <= bobWeight {
		yearsCount++
		limanWeight *= 3
		bobWeight *= 2
	}
	fmt.Println(yearsCount)

}


package main

import "fmt"

func main() {
	var x, y int

	fmt.Scanf("%d%d", &x, &y)

	cnt := 0
	for x <= y {
		x = x * 3
		y = y *2
		cnt++
	}
	fmt.Println(cnt)
}


package main

import (
	"fmt"
	"sort"
)

func calc(arr []int) int{
	sort.Ints(arr)
	count := 0
	for i:=0;i<len(arr);i++{
		if arr[i]==0{
			continue
		}else{
			for j:=i+1;j<len(arr);j++{
				if arr[j]%arr[i]==0{
					arr[j] = 0
				}
			}
			arr[i] = 0
			count++
		}
	}
	return count
}

func main(){
	var n int
	fmt.Scan(&n)
	arr := make([]int,n)
	for i:=0;i<n;i++{
		fmt.Scan(&arr[i])
	}
	fmt.Print(calc(arr))
}


package main

import (
	"bufio"
	"os"
	"runtime"
	"sort"
	"strconv"
)

/* solution */

func solve() {

	n := readInt()
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = readInt()
	}

	sort.Ints(a)

	colors := n
	for i := 1; i < n; i++ {
		for j := 0; j < i; j++ {
			if a[i]%a[j] == 0 {
				colors--
				break
			}
		}
	}

	printInt(colors)

}

/* stubs */

func main() {

	var f *os.File
	if runtime.GOROOT() == "C:\\Soft\\Go" {
		f, _ = os.Open("input.txt")
		defer f.Close()
	} else {
		f = os.Stdin
	}

	writer = bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	reader = bufio.NewScanner(f)

	const maxCapacity = 1024 * 1024
	buf := make([]byte, maxCapacity)
	reader.Buffer(buf, maxCapacity)

	reader.Split(bufio.ScanWords)

	solve()

}

var reader *bufio.Scanner
var writer *bufio.Writer

func read() string {
	reader.Scan()
	return reader.Text()
}

func readInt() int {
	reader.Scan()
	ret, _ := strconv.Atoi(reader.Text())
	return ret
}

func print(s string) {
	writer.WriteString(s)
	writer.WriteString("\n")
}

func printInt(i int) {
	print(strconv.Itoa(i))
}

func printInt64(i int64) {
	print(strconv.FormatInt(i, 10))
}

func readInt64() int64 {
	reader.Scan()
	ret, _ := strconv.ParseInt(reader.Text(), 10, 64)
	return ret
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
)

var n int
var a []int

func main() {
	stdin := os.Stdin
	reader := bufio.NewReaderSize(stdin, 1024*1024)
	fmt.Fscanf(reader, "%d%d\n", &n)
	a = make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Fscanf(reader, "%d", &a[i])
	}
	sort.Ints(a)

	ans := 0
	for i := 0; i < n; i++ {

		if a[i] == -1 {
			continue
		}
		ans++
		for j := i + 1; j < n; j++ {
			if a[j]%a[i] == 0 {
				a[j] = -1
			}
		}
		a[i] = -1
	}

	fmt.Println(ans)
}


package main
import (
	"fmt"
)
func main() {
	var s int
	fmt.Scan(&s)
    array1 := []string{"zero","one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"}
	array2 := []string{"twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"}
	if 0 <= s && s <= 19 {
		fmt.Println(array1[s])
	} else if s == 20 || s == 30 || s == 40 || s == 50 || s == 60 || s == 70 || s == 80 || s == 90 {
		fmt.Println(array2[(s/10) - 2])
	} else {
		fmt.Print(array2[(s/10) - 2])
		fmt.Print("-")
		fmt.Println(array1[s%10])
	}
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	reader := bufio.NewReader(os.Stdin)
	exp := map[int]string{
		1:  "one",
		2:  "two",
		3:  "three",
		4:  "four",
		5:  "five",
		6:  "six",
		7:  "seven",
		8:  "eight",
		9:  "nine",
		10: "ten",
		11: "eleven",
		12: "twelve",
		13: "thirteen",
		15: "fifteen",
		18: "eighteen",
		20: "twenty",
		30: "thirty",
		40: "forty",
		50: "fifty",
		80: "eighty",
	}

	var scr int
	fmt.Fscan(reader, &scr)
	if scr == 0 {
		fmt.Println("zero")
		return
	}
	if _, exst := exp[scr]; exst {
		fmt.Println(exp[scr])
		return
	}

	if scr/10 == 1 {
		fmt.Printf("%s%s", exp[scr%10], "teen")
	} else {
		if _, exst := exp[(scr/10)*10]; exst {
			fmt.Print(exp[(scr/10)*10])
		} else {
			fmt.Printf("%s%s", exp[scr/10], "ty")
		}
		if scr%10 > 0 {
			fmt.Printf("-%s", exp[scr%10])
		}
	}
}


package main

import "fmt"

var tab map[int][]string = map[int][]string{
	0: {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"},
	1: {"ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"},
	2: {"twenty"}, 3: {"thirty"}, 4: {"forty"}, 5: {"fifty"}, 6: {"sixty"}, 7: {"seventy"}, 8: {"eighty"}, 9: {"ninety"},
}

func main() {
	var s int
	fmt.Scanf("%d", &s)
	d := s / 10
	u := s % 10
	n := ""
	switch {
	case d == 0 || d == 1:
		n = tab[d][u]
	case u == 0:
		n = tab[d][0]
	default:
		n = fmt.Sprintf("%s-%s", tab[d][0], tab[0][u])
	}
	fmt.Printf("%s\n", n)
}


package main

import(
    "fmt"
    "os"
)

var print = fmt.Println

func main(){
    var a,b,c,d int;

    fmt.Fscan(os.Stdin, &a,&b,&c,&d);

    if(a + b == c + d || a + c == d + b || a + d == b + c || a + b + c == d || a + b + d == c || a + c + d == b || b + c + d == a){
        print("YES");
    }else {
        print("NO");
    }
}


package main

import (
	"fmt"
	"sort"
)

func main() {
	var arr = []int{0, 0, 0, 0}
	fmt.Scanf("%d %d %d %d", &arr[0], &arr[1], &arr[2], &arr[3])

	sort.Ints(arr)

	if ((arr[0] + arr[3]) == (arr[1] + arr[2])) || ((arr[0] + arr[1] + arr[2]) == arr[3]) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import (
    "fmt"
    "strings"
)

func main() {
    var s string
    fmt.Scan(&s)
    lowerCount, upperCount := 0, 0
    for i := 0; i < len(s); i++ {
        if s[i] <= 'Z' { upperCount++ } else { lowerCount++ }
    }
    if lowerCount >= upperCount {
        s = strings.ToLower(s)
    } else {
        s = strings.ToUpper(s)
    }
    fmt.Println(s)
}


package main

import (
	"fmt"
	"strings"
	"unicode"
)

func main() {
	var input string
	fmt.Scanf("%s\n", &input)
	count := 0
	for _, v := range input {
		if unicode.IsUpper(v) {
			count++
		}
	}
	if count > len(input)-count {
		fmt.Println(strings.ToUpper(input))
	} else {
		fmt.Println(strings.ToLower(input))
	}
}


package main
import (
    "fmt"
    "unicode"
    "strings"
)
func main() {
	var a string
	var ct int
	fmt.Scanln(&a)
	    for _,i := range a {
	        if(unicode.IsUpper(i)){
	            ct++
	        }
	    }

	if ct > len(a)-ct {
		fmt.Println(strings.ToUpper(a))
	} else {
		fmt.Println(strings.ToLower(a))
	}
}


package main

import (
	"fmt"
)

func main() {
	var n, m int
	fmt.Scan(&n, &m)

	sums := make([]int, n+1, n+1)
	for i := 1; i <= n; i++ {
		sums[i] = i + sums[i-1]
	}

	if m >= sums[n] {
		m %= sums[n]
	}

	for i := 1; i <= n; i++ {
		if m < sums[i] {
			m -= sums[i-1]
			break
		}
	}

	fmt.Println(m)
}


package main
import (
	"fmt"
	//"unicode/utf8"
)

func main() {
	var m,n int
	fmt.Scan(&n,&m)
	m%=(n*(n+1)/2)
	for i:=1;i<=m;i++ {
		m-=i
	}
	fmt.Println(m)
}


package main

import "fmt"

func main() {
    var n,m int
    fmt.Scan(&n,&m)
    m %= n*(n+1)/2
    for i := 1; m > 0; i++ {
        if m >= i {
            m -= i
        } else {
            break
        }
    }
    fmt.Println(m)
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

var DIV int64 = 1000000007

func culc(a, n int64) int64 {
	if n == 0 {
		return 1
	}

	if n == 1 {
		return a
	}

	if n%2 == 1 {
		return culc(a, n-1) * a % DIV
	}

	sum := culc(a, n/2)
	return sum * sum % DIV
}

func main() {

	reader := bufio.NewReader(os.Stdin)

	var n, m int64

	fmt.Fscanf(reader, "%d %d\n", &n, &m)

	sum := culc(2, m) - 1
	sum = culc(sum, n)

	fmt.Printf("%d\n", sum)
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

func pow(a, b int64) int64 {
	as := make([]int64, 2);
	bs := make([]int64, 2);
	as[1] = a;
	bs[1] = 1;
	for b > bs[len(bs)-1] {
		as = append(as, (as[len(as)-1] * as[len(as)-1]) % 1000000007)
		bs = append(bs, 2*bs[len(bs)-1])
	}

	var ans int64 = 1
	for i := len(bs)-1; i > 0; i-- {
		if b >= bs[i] {
			ans = (ans * as[i]) % 1000000007
			b -= bs[i]
		}
	}
	return ans
}

func main() {
	in := bufio.NewReader(os.Stdin);
	out := bufio.NewWriter(os.Stdout);
	defer out.Flush();

	var n, m int64;
	fmt.Fscan(in, &n, &m);

	first := pow(2, m) - 1
	second := pow(first, n)
	fmt.Fprint(out, second)
}