package main

import (
	"fmt"
	"strings"
	"math/rand"
	"sort"
	"sync"
)

const MAX = 3

func Sort(A []int, N int) []int {
	q := len(A) / N
	r := len(A) % N
	splits := make([][]int, N)
	pos := 0
	for i := 0; i < N; i++ {
		var delta int
		if i < r {
			delta = q + 1;
		} else {
			delta = q;
		}
		splits[i] = A[pos : pos + delta]
		pos += delta
	}
	waitGroup := new(sync.WaitGroup)
	for i := 0; i < N; i++ {
		waitGroup.Add(1)
		go func(B []int) {
			sort.Ints(B)
			waitGroup.Done()
		}(splits[i])
	}
	waitGroup.Wait()
	B := make([]int, 0);
	next := make([]int, N)
	for len(B) < len(A) {
		idx := -1
		for i := 0; i < N; i++ {
			if next[i] < len(splits[i]) && (idx == -1 || splits[i][next[i]] < splits[idx][next[idx]]) {
				idx = i
			}
		}
		B = append(B, splits[idx][next[idx]])
		next[idx]++
	}
	return B
}

func main() {
	var input string
	fmt.Scanln(&input)
	digits := strings.Split(input, "+")
	ints := make([]int, 0)
	for i := 0; i < len(digits); i++ {
		ints = append(ints, int(digits[i][0]) - '0')
	}
	N := rand.Intn(len(A)) + 1
	ints = Sort(ints, N)
	for i := 0; i < len(ints); i++ {
		if i > 0 {
			fmt.Print("+")
		}
		fmt.Print(ints[i])
	}
	fmt.Println()
}


package main

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

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 getNext(x int64) int64 {
  //fmt.Fprintf(os.Stderr, "in: %d\n", x)
  digits := []int64{}
  for x != 0 {
    digits = append(digits, x%10)
    x /= 10
  }
  carry := int64(0)
  carryIndex := -1
  for i, digit := range digits {
    if carry == 1 {
      digit++
      carry = 0
    }
    if digit <= 4 {
      digits[i] = 4
    } else if digit <= 7 {
      digits[i] = 7
    } else {
      digits[i] = 4
      carry = 1
      carryIndex = i
    }
  }
  if carry == 1 {
    digits = append(digits, 4)
  }
  for i := 0; i <= carryIndex; i++ {
    digits[i] = 4
  }
  base := int64(1)
  for _, digit := range digits {
    x += base*digit
    base *= 10
  }
  //fmt.Fprintf(os.Stderr, " -> %d\n", x)
  return x
}

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

  left, right := getI64(), getI64()
  total := int64(0)
  max := getNext(right)
  current := left-1
  for {
    next := getNext(current+1)
    if next == max {
      total += (right-current)*next
      break
    }
    total += (next-current)*next
    current = next
  }
  writer.WriteString(fmt.Sprintf("%d\n", total))
}


package main

import (
	"fmt"
)

func solve(t, s, x int) bool {
	if x <= t {
		return t == x
	}

	delta := x - t
	//return (delta%s) == 0 || (delta/s >= 1 && delta%s == 1)
	return true
}

func main() {
	var t, s, x int
	fmt.Scan(&t, &s, &x)
	if solve(t, s, x) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import (
	"fmt"
)

func solve(t, s, x int) bool {
	//if x <= t {
	//return t == x
	//}
	if x == t {
		return false
	}

	delta := x - t
	return (delta%s) == 0 || (delta/s >= 1 && delta%s == 1)
	return true
}

func main() {
	var t, s, x int
	fmt.Scan(&t, &s, &x)
	if solve(t, s, x) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import (
	"fmt"
)

func main() {
	var sh, sm, lh, lm int
	fmt.Scanf("%d:%d", &sh, &sm)
	fmt.Scanf("%d:%d", &lh, &lm)

	var ah, am int

	ah = sh - lh
	am = sm - lm
	if am < 0 {
		am = 60 + am
		ah--
	}
	if ah < 0 {
		ah = 24 + ah
	}

	if ah < 10 {
		fmt.Printf("0%d:", ah)
	} else {
		fmt.Printf("%d:", ah)
	}

	if ah < 10 {
		fmt.Printf("0%d", am)
	} else {
		fmt.Printf("%d", am)
	}

}


package main

import "fmt"

func main() {
    var sh, sm, lh, lm int
    fmt.Scanf("%d:%d\n", &sh, &sm)
    fmt.Scanf("%d:%d", &lh, &lm)

    var ah,am int

    ah = sh - lh
    am = sm - lm

    if am < 0 {
        am = 60 + am
        ah = ah - 1
    }

    if ah < 0 {
        ah = 24 + ah % 24
    }

    if ah < 10 {
        fmt.Printf("0%d:", ah)
    } else {
        fmt.Printf("%d:", ah)
    }

    if am < 10 {
        fmt.Printf("0%d", am)
    } else {
        fmt.Printf("%d", am)
    }
}


// Package main provides
//
// File:  a.go
// Author: ymiyamoto
//
// Created on Sun Dec 30 23:45:54 2018
//
package main

import "fmt"

func main() {
	var y, b, r int
	fmt.Scan(&y, &b, &r)
	i := 0
	for i = 1; i <= y && i+1 <= b && i+2 <= r; i++ {
	}
	fmt.Println(y + b + r)
}


import (
	"fmt"
)

func min(n1 int, n2 int) int {
	if n1 < n2 {
		return n1
	} else {
		return n2
	}
}

func main() {
	var y, b, r int
	fmt.Scanf("%d %d %d", &y, &b, &r)
	yNum := min(y, min(b-1, r-2))
	fmt.Println(yNum*3 + 3)
}


package main

import (
	"fmt"
)

func main() {
	min := [2]int{0, int((^uint(0)) >> 1)}

	for i := 0; i != 3; i++ {
		var v int
		fmt.Scan(&v)
		if (v - i) <= min[1] {
			min[0] = i
			min[1] = v
		}
	}

	var res int
	switch min[0] {
	case 0:
		res = min[1]*3 + 3
	case 1:
		res = min[1] * 3
	case 2:
		res = min[1]*3 - 3
	}
	fmt.Println(res)
}


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

func main() {
	var a,b int64
	fmt.Scan(&a,&b)
	if a>0 && b>0 {
		fmt.Print("0 ",a+b,a+b," 0")
		fmt.Println()
	} else if a<0 && b>0 {
		fmt.Print(a-b,"0 ","0 ",b-a)
		fmt.Println()
	} else if a<0 && b<0 {
		fmt.Print(a+b,"0 ","0 ",a+b)
		fmt.Println()
	} else if a>0 && b<0 {
	        fmt.Print("0 ",b-a,a-b," 0")
	        fmt.Println()
	}

}


// 336A
package main

import (
	"fmt"
)

func main() {
	var a,b int
	fmt.Scan(&a, &b)
	x := a+b
	y:= a-b
	if x>0{
		if y>0{
			fmt.Println(0,x,x,0)
		}else{
			fmt.Println(0,-y,y,0)
		}
	} else{
		if y>0{
			fmt.Println(y,0,0,-y)
		}else{
			fmt.Println(x,0,0,x)
		}
	}

}


// 258A-mic
package main

import (
    "fmt"
    "math"
)

func main() {
    var i, k float64
    fmt.Scan(&i, &k)
    t := int64(math.Abs(math.Abs(i) + math.Abs(k)))
    if i > 0 && k > 0 {
        fmt.Printf("0 %d %d 0\n", t, t)
    } else if i > 0 && k < 0 {
        fmt.Printf("0 %d %d 0\n", -t, t)
    } else if i < 0 && k > 0 {
        fmt.Printf("%d 0 0 %d\n", -t, t)
    } else {
        fmt.Println("%d 0 0 %d\n", -t, -t)
    }
}


package main

import "fmt"

func main () {
	var num int

	cnt := 0

	for i := 0; i < 5; i++ {
		for j := 0; j < 5; j++ {
			fmt.Scan(&num)
			if num == 1 {
				i = 2 - i
				j = 2 - j
				if i < 0 {
					cnt -= i
				} else {
					cnt += i
				}
				if j < 0 {
					cnt -= j
				} else {
					cnt += j
				}

				fmt.Println(cnt)
			}
		}
	}
}


package main

import (
	"fmt"
	"math"
)

type Vector struct {
	x int
	y int
}

func (v *Vector) diff(end *Vector) (x int, y int) {
	return v.x - end.x, v.y - end.y
}

func main() {
	a := 0
	matrix := [5][5]byte{}

	i := 0
	j := 0

	center := Vector{3, 3}
	start := Vector{}

	for {
		_, err := fmt.Scanf("%d", &a)
		if err != nil {
			panic(err)
		}

		matrix[i][j] = byte(a)
		if a == 1 {
			start = Vector{i, j}
		}

		if j == 4 {
			i++
			j = -1
		}

		j++
	}

	x, y := start.diff(&center)

	steps := math.Abs(float64(x)) + math.Abs(float64(y))

	fmt.Println(int(steps))
}


package main

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

func main() {
  //cin := bufio.NewReader(os.Stdin)
	//cout := bufio.NewWriter(os.Stdout)
	//defer cout.Flush()

    var k,n,w int
    fmt.Scan(&k)
    fmt.Scan(&n)
    fmt.Scan(&w)
    money:=0
	for x := 1; x < w+1; x++ {
    money+= k*x


package main

import (
        "fmt"
)

var n int
var k int

func main() {
        fmt.Scanf("%d %d", &n, &k)
        cnt2 := 0
        cnt5 := 0
        res := n
        for {
                if cnt5 >= k || n%5 != 0 {
                        break
                }
                res = res / 5
                cnt5++
        }
        for {
                if cnt2 >= k || n%2 != 0 {
                        break
                }
                res = res / 2
                cnt2++
        }
        for i := 0; i < k; i++ {
                res = res * 10
        }
        fmt.Println(res)
}


package main

import (
        "fmt"
)

var n int64
var k int64

func main() {
        fmt.Scanf("%d %d", &n, &k)
        cnt2 := 0
        cnt5 := 0
        res := n
        for {
                if cnt5 >= k || res%5 != 0 {
                        break
                }
                res = res / 5
                cnt5++
        }
        for {
                if cnt2 >= k || res%2 != 0 {
                        break
                }
                res = res / 2
                cnt2++
        }
        for i := 0; i < k; i++ {
                res = res * 10
        }
        fmt.Println(res)
}


package main

import "fmt"

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

    for i=n; i > 0 && ; i-- {
        ans+=s/i
        s %= i
    }
}


package main
import "fmt"
func main() {
	var n,s int
	fmt.Scan(&n,&s);
	k:=0
	if n%s!=0 {
		k = 1
	}
	fmt.Print(s/n+k)
}


package main

import "fmt"

func main() {
        var n, s int64
        fmt.Scan(&n)
        fmt.Scan(&s)
        if n>=s {
                fmt.Println("1")
        } else {
                ans := s/n+1
                fmt.Println(ans)
        }
}


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 n uint64
	for I(&n, "\n") == nil {
		solve(n)
	}
}

func solve(n uint64) {
	O([]int{8, 4, 2, 6}[n%4-1], "\n")
}


package main

import "fmt"

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

    var lastDigit = 1
    for i:=0; i < n; i++ {
        lastDigit = (lastDigit*8)%10
    }
    fmt.Print(lastDigit)
}


package main

import "fmt"

func main() {
    var n uint64
    fmt.Scan(&n)

    var lastDigit uint64 = 1
    var level uint64 = 8
    for n > 0 {
        if n%2 == 1 {
            lastDigit = (lastDigit*level)%10
        }
        level = (level*level)/10
        n /= 2
    }

    fmt.Print(lastDigit)
}


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, a int
	fmt.Fscanf(reader, "%d\n", &n)
	a = 6
	n %= 4
	for i := 0; i < n; i++ {
		a *= 8
	}
	fmt.Println(a % 10)
}

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"

func main() {
	var MOD int64 = 10000007
	var r, g int
	fmt.Scan(&r, &g)
	h := 0

	for i := 1; i <= 1000; i++ {
		if (i * (i + 1) / 2) > r+g {
			h = i - 1
			break
		}
	}

	dp := make([]int64, r+1)
	dp[0] = 1

	for i := 1; i <= h; i++ {
		for j := r - i; j >= 0; j-- {
			dp[j+i] += dp[j]
			if dp[j+i] >= MOD {
				dp[j+i] -= MOD
			}
		}
	}

	var answer int64 = 0
	for i := 0; i <= r; i++ {
		if h*(h+1)/2-i <= g {
			answer += dp[i];
		}
	}

	fmt.Print(answer % MOD)
}


package main

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

const (
	EPS = 1e-8
)

var (
	reader = bufio.NewReader(os.Stdin)
)

type Light struct {
	p complex128
	a float64
}

type Line struct {
	p1, p2 complex128
}

func CrossProduct(a complex128, b complex128) float64 {
	return real(a)*imag(b) - real(b)*imag(a)
}

func Roatate(x complex128, a float64) complex128 {
	r, t := cmplx.Polar(x)
	return cmplx.Rect(r, t+a)
}

func Intersact(a Line, b Line) (intersaction complex128, isIntersact bool) {
	s1 := CrossProduct(a.p2-a.p1, b.p1-a.p1)
	s2 := CrossProduct(a.p2-a.p1, b.p2-a.p1)
	if math.Abs(s2-s1) >= EPS {
		isIntersact = true
		intersaction = complex(real(b.p1)*s2-real(b.p2)*s1, imag(b.p1)*s2-imag(b.p2)*s1) / complex(s2-s1, 0.0)
	}
	return
}

func foo(l float64, lit Light, r float64) float64 {
	v1 := complex(l-real(lit.p), 0-imag(lit.p))
	v2 := Roatate(v1, lit.a)
	if imag(v2) > -EPS {
		return r
	}

	p1 := complex(0.0, 0.0)
	p2 := complex(10.0, 0.0)
	inter, _ := Intersact(Line{lit.p, lit.p + v2}, Line{p1, p2})
	return real(inter)
}

func main() {
	var (
		n    int
		l, r float64
		lits []Light
	)

	fmt.Fscan(reader, &n, &l, &r)
	for i := 0; i < n; i++ {
		var x, y, a float64
		fmt.Fscan(reader, &x, &y, &a)
		lits = append(lits, Light{complex(x, y), a * math.Pi / 180.0})
	}

	f := make([]float64, 1<<uint(n))
	for i := range f {
		f[i] = l
	}
	for i := 0; i < (1 << uint(n)); i++ {
		for j := 0; j < n; j++ {
			if k := i | 1<<uint(j); i != k {
				cur := foo(f[i], lits[j], r)
				if cur > f[k] {
					f[k] = cur
				}
			}
		}
	}
	fmt.Print(f[(1<<uint(n))-1] - l)
}


package main

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

func toInt(buf []byte) (n int) {
	for _, v := range buf {
		n = n * 10 + int(v - '0')
	}
	return
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	scanner.Scan()
	m := toInt(scanner.Bytes())
	scanner.Scan()
	s := toInt(scanner.Bytes())

	if s < 1 || m * 9 < s {
		fmt.Println("-1 -1")
		return
	}

	maximum := make([]int, m)
	for i := 0; i < m; i++ {
		var d int
		if s > 9 {
			d = 9
		}else {
			d = s
		}
		s -= d
		maximum[i] = d
	}
	dec := false
	if maximum[m - 1] == 0 {
		fmt.Printf("%d", 1)
		dec = true
	}else {
		fmt.Printf("%d", maximum[m - 1])
	}
	for i := m - 2; i >= 0; i-- {
		if dec && maximum[i] > 0 {
			fmt.Printf("%d", maximum[i] - 1)
			dec = false
		}else {
			fmt.Printf("%d", maximum[i])
		}
	}

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

}


package main

import (
	"fmt"
	"strconv"
)

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 reverse(s string) (result string) {
	for _, v := range s {
		result = string(v) + result
	}
	return
}

func getMax(m, s int) string {
	r := ""
	for i := 0; i < m; i++ {
		next := min(9, s)
		s -= next
		r += strconv.Itoa(next)
	}
	return r
}

func getMin(m, s int) string {
	h := max(1, s-9*(m-1))
	max := getMax(m-1, s-h)
	return strconv.Itoa(h) + reverse(max)
}

func main() {
	var m, s int
	fmt.Scanf("%d %d \n", &m, &s)
	if s == 0 || s > 9*m {
		fmt.Print(-1, -1)
		return
	}
	if m == 1 {
		fmt.Print(s, s)
		return
	}
	fmt.Print(getMin(m, s) + " " + getMax(m, s))
}


package main

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

var (
	scanner = bufio.NewScanner(os.Stdin)
	writer  = bufio.NewWriter(os.Stdout)
)

func main() {
	defer writer.Flush()

	scanner.Split(bufio.ScanWords)

	n, sum := readInt(), readInt()
	minNum := make([]int, n)
	maxNum := make([]int, n)
	im := []int{-1}

	if (9*n < sum) || (sum == 0 && n > 1) {
		writeExit(im, im)
	}

	/*	if sum < 10 {
			maxNum[0] = sum
			minNum[0] = 1
			minNum[n-1] = sum - 1
			writeExit(minNum, maxNum)
		}
	*/
	s, i := sum, 0
	for ; (s >= 9) && (i < n-1); s, i = s-9, i+1 {
		maxNum[i] = 9
	}

	maxNum[i] = s

	minNum = reverse(maxNum)

	if minNum[0] == 0 {
		minNum[0]++
		minNum[n-i-1]--
	}

	writeExit(minNum, maxNum)
}

func reverse(a []int) []int {

	s := make([]int, len(a))
	for i, j := 0, len(a)-1; i <= j; i, j = i+1, j-1 {
		s[i], s[j] = a[j], a[i]
	}
	return s
}

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

func writeExit(a []int, b []int) {

	for _, value := range a {
		writer.WriteString(strconv.Itoa(value))
	}

	writer.WriteString(" ")

	for _, value := range b {
		writer.WriteString(strconv.Itoa(value))
	}

	writer.Flush()
	os.Exit(0)
}


package main

import "fmt"
func main() {
	var a, b, c int64
	fmt.Scan(&a, &b, &c)
	fmt.Println ((a-1)/c + 1) * ((b-1)/c + 1)
}


package main

import "fmt"
import "math"
import "os"
import "strconv"

func main() {
	var n, m, a int
	n, _ = strconv.Atoi(os.Args[1])
	m, _ = strconv.Atoi(os.Args[2])
	a, _ = strconv.Atoi(os.Args[3])
	// Not sure how to convert...
	nFloat := float64(n)
	mFloat := float64(m)
	aFloat := float64(a)
	// How many are needed in X axis?
	x := math.Ceil(nFloat / aFloat)
	y := math.Ceil(mFloat / aFloat)
	fmt.Println(x + y)
}


/*A. Theatre Square
time limit per test1 second
memory limit per test256 megabytes
inputstandard input
outputstandard output
Theatre Square in the capital city of Berland has a rectangular shape with the size n × m meters. On the occasion of the city's anniversary, a decision was taken to pave the Square with square granite flagstones. Each flagstone is of the size a × a.

What is the least number of flagstones needed to pave the Square? It's allowed to cover the surface larger than the Theatre Square, but the Square has to be covered. It's not allowed to break the flagstones. The sides of flagstones should be parallel to the sides of the Square.

Input
The input contains three positive integer numbers in the first line: n,  m and a (1 ≤  n, m, a ≤ 109).

Output
Write the needed number of flagstones.

Examples
inputCopy
6 6 4
outputCopy
4
*/

package main

import (
	"fmt"
	"math"
)

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

	a_in_n_ceil := uint64(math.Ceil(n / a))

	a_in_m_ceil := uint64(math.Ceil(m / a))

	a_in_n_and_m = a_in_n_ceil * a_in_m_ceil

	square_volume := n * m
	flagstone_volume := a * a

	if flagstone_volume >= square_volume {
		a_in_n_and_m = 1
	}

	fmt.Println(a_in_n_and_m)

}


/*A. Theatre Square
time limit per test1 second
memory limit per test256 megabytes
inputstandard input
outputstandard output
Theatre Square in the capital city of Berland has a rectangular shape with the size n × m meters. On the occasion of the city's anniversary, a decision was taken to pave the Square with square granite flagstones. Each flagstone is of the size a × a.

What is the least number of flagstones needed to pave the Square? It's allowed to cover the surface larger than the Theatre Square, but the Square has to be covered. It's not allowed to break the flagstones. The sides of flagstones should be parallel to the sides of the Square.

Input
The input contains three positive integer numbers in the first line: n,  m and a (1 ≤  n, m, a ≤ 109).

Output
Write the needed number of flagstones.

Examples
inputCopy
6 6 4
outputCopy
4
*/

package main

import (
	"fmt"
	"math"
)

func main() {
	var n, m, a float32
	fmt.Scanf("%b %b %b", &n, &m, &a)

	a_in_n_ceil := uint64(math.Ceil(n / a))

	a_in_m_ceil := uint64(math.Ceil(m / a))

	a_in_n_and_m := a_in_n_ceil * a_in_m_ceil

	/*	square_volume := n * m
		flagstone_volume := a * a

		if flagstone_volume >= square_volume {
			a_in_n_and_m = 1
		}
	*/
	fmt.Println(a_in_n_and_m)

}


package main

import (
	"fmt"
)

func main() {
	var n, m, a, result, x1, x2 int64
	fmt.Scan(&n)
	fmt.Scan(&m)
	fmt.Scan(&a)

	if n%a != 0 {
		x1 = (n / a) + 1
	} else {
		x1 = n / a
	}
	if m%a != 0 {
		x2 = (m / a) + 1
	} else {
		x2 := m / a
	}
	result = x1 * x2
	fmt.Println(result)

}


package main

import "fmt"

func main() {
    var n,m,a,v,h int
    fmt.Scan(&n,&m)
    fmt.Scan(&a)
    v= (int)n/a
    if v%a!= 0 {
        v=v+1
    }
    h= (int)m/a
    if h%a!=0 {
        h=h+1
    }
    fmt.Println(v*h)
}


package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	slice := strings.Fields(scanner.Text())
	m, _ := strconv.Atoi(slice[0])
	n, _ := strconv.Atoi(slice[1])
	a, _ := strconv.Atoi(slice[2])
	if n > m {
		m, n = n, m
	}
	num_flags := 0
	for m > 0 {
		temp := n
		for temp > 0 {
			temp -= a
			num_flags++
		}
		m -= a
	}
	fmt.Print(num_flags)
}


package main

import "fmt"

func main() {
	var m, n, a, sum int64
	sum = 0
	fmt.Scanf("%d%d%d", &m, &n, &a)

	for ; n > 0; n = n - a {
		if m%a != 0 {
			sum += m/a + 1
		} else {
			sum += m / a
		}
	}

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


package main

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

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

//Wrong
func main() {
	defer writer.Flush()
	scanner.Split(bufio.ScanWords)

	a, b, s := nextInt(), nextInt(), nextInt()

	step := abs(a) + abs(b)

	if s < step || abs(s-step) == 1 {
		println("No")
	} else {
		println("Yes")
	}

}

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

	return n
}

func scan(a ...interface{}) {
	fmt.Fscan(reader, a...)
}

func next() string {
	if !scanner.Scan() {
		panic("Scan error")
	}
	return scanner.Text()
}

func nextInt() int {
	n, _ := strconv.Atoi(next())
	return n
}

func nextFloat() float64 {
	n, _ := strconv.ParseFloat(next(), 64)
	return n
}

func println(a ...interface{}) {
	fmt.Fprintln(writer, a...)
}

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


package main

import "fmt"

func main() {
    var a, b, s int
    fmt.Scanf("%d %d %d", &a, &b, &s)
    if ((a + b) == 0 && s & 1 == 0) || (s != 0 && s % (a + b) == 0) {
        fmt.Println("Yes")
    } else {
        fmt.Println("No")
    }
}


package main

import "fmt"

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

	delta := s - a - b
	if delta >= 0 && delta%2 == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import (
    "fmt"
    )

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

    delta := s - (a + b)
    if delta < 0 {
        fmt.Println("No")
    } else if delta & 1 == 0 {
        fmt.Println("Yes")
    } else {
        fmt.Println("No")
    }
}


package main

import "fmt"

func getCnt(n int64) int64 {
  var sum int64
  for k:= int64(2); k*k*k <= n; k++ {
    sum += n/(k*k*k)
  }
  return sum
}

func main() {
  var m int64
  fmt.Scan(&m)

  var lo, hi int64
  lo = 1
  hi = 100000000000
  for lo+1 < hi {
    mid := (lo+hi)/2
    sum := int64(0)
    for k:= int64(2); k*k*k <= mid; k++ {
      sum += mid/(k*k*k)
    }
    if sum >= m {
      hi = mid
    } else {
      lo = mid
    }
  }
  hiCnt := getCnt(hi)
  if hiCnt == m {
    fmt.Println(hi)
  } else {
    fmt.Println(-1)
  }
}


package main

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

func scanInt(scanner *bufio.Scanner) int {
  scanner.Scan()
  x, _ := strconv.Atoi(scanner.Text())
  return x
}

func main() {
  scanner := bufio.NewScanner(os.Stdin)
  scanner.Split(bufio.ScanWords)
  writer := bufio.NewWriter(os.Stdout)
  defer writer.Flush()
  side, x, y := scanInt(scanner), scanInt(scanner), scanInt(scanner)
  a, b := side/2, side/2+1
  if x == a || x == b || y == a || y == b {
    writer.WriteString("NO\n")
  } else {
    writer.WriteString("YES\n")
  }
}


// 112B-Andre,Dikai,Eric
package main

import (
    "fmt"
)

func main() {
    var n,x,y int
    fmt.Scan(&n,&x,&y)
    if n==2{
        fmt.Println("NO")
    }else
    {if x == n/2 || x == (n/2)+1 && y == n/2 || y == (n/2)+1{
        fmt.Println("NO")
    }else
    {fmt.Println("YES")}
    }

}


import (
	"fmt"
)

func main() {
	var n,x,y int
	fmt.Scan(&n,&x,&y)
	if n==2{
		fmt.Println("NO")
	}else
	{if x == n/2 || x == (n/2)+1 && y == n/2 || y == (n/2)+1{
		fmt.Println("NO")
	}else
	{fmt.Println("YES")}
	}

}


package main

import (
	"fmt"
)

func main() {
	var A, B int64
	var x, y, z int64
	for {
		fmt.Scan(&A, &B)
		fmt.Scan(&x, &y, &z)
		var yellow, blue int64
		yellow = x*2 + y - A
		if yellow < 0 {
			yellow = 0
		}
		blue = y + 3*z - B
		if blue < 0 {
			blue = 0
		}
		fmt.Println(yellow + blue)
	}
}


package main

import "fmt"

func main() {
    var s string
    fmt.Scan(&s)
    runes := []rune(s)
    f, b := 0, len(runes)
    cnt := 0
    for f < b {
        if runes[f] != runes[b] {
            cnt++
        }
    }
    if cnt > 1 {
        fmt.Print("NO")
    } else {
        fmt.Print("YES")
    }
}


package main

import "fmt"

func main() {
    var s string
    fmt.Scan(&s)
    runes := []rune(s)
    f, b := 0, len(runes)-1
    cnt := 0
    for f < b {
        if runes[f] != runes[b] {
            cnt++
        }
    }
    if cnt > 1 {
        fmt.Print("NO")
    } else {
        fmt.Print("YES")
    }
}


package main

import "fmt"

func main() {
	var s string
	fmt.Scan(&s)
	runes := []rune(s)
	f, b := 0, len(runes)-1
	cnt := 0
	for f < b {
		if runes[f] != runes[b] {
			cnt++
		}
		f++
		b--
	}
	if cnt == 1 {
		fmt.Print("YES")
	} else {
		fmt.Print("NO")
	}
}


package main

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

func main() {
	// reader := bufio.NewReader(os.Stdin)
	// reader.ReadLine()
	// fmt.Scanf("%d", &N)
	var s string
	fmt.Scanf("%s", &s)
	res := 0
	l := len(s)
	for i := 0; i < l/2; i++ {
		if s[i] != s[l-1-i] {
			res += 1
		}
	}

	if res == 1 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	n, k := 0, 0
	s := ""
	fmt.Fscanf(in, "%d %d\n", &n, &k)
	fmt.Fscanf(in, "%s\n", &s)
	//	fmt.Println(s)
	a := make([]int, 26)
	for i := 0; i < len(s); i++ {
		a[s[i]-'a'] = 1
	}
	ans := 0
	cnt := 0
	for i := 0; i < k; i++ {
		for j := 0; j < 26; j++ {
			if a[j] == 1 {
				ans += j + 1
				cnt++
				a[j] = 0
				if j+1 < 26 {
					a[j+1] = 0
				}
				if j+2 < 26 {
					a[j+2] = 0
				}
				break
			}
		}
	}
	//fmt.Println(ans, cnt)
	if cnt < k {
		fmt.Fprintf(out, "%d\n", -1)
	} else {
		fmt.Fprintf(out, "%d\n", ans)
	}
	return
}


package main

import (
	"fmt"
	"sort"
	"strings"
)

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

	var str string
	fmt.Scanln(&str)

	unsorted := strings.Split(str, "")
	sort.Strings(unsorted)
	sorted := strings.Join(unsorted, "")
	s := []rune(sorted)

	weight := s[0] - 96
	count := 1
	prev := 0
	for i := 1; i < k; i++ {
		if s[i]-s[prev] < 2 {
			continue
		}

		weight += s[i] - 96
		count++
		prev = i
		if count == n {
			break
		}
	}

	if count != n {
		fmt.Println("-1")
	} else {
		fmt.Println(weight)
	}
}


package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)

	var list [8][8]string

	result := 0

	for i := 0; i < 8 ; i++ {
		input, _ := reader.ReadString('\n')

		for j, r := range input {
			list[i][j] = string(r)
		}
	}

	for i := 0; i < 8 ; i++ {
		now := true
		firstChar := list[i][0]

		for j := 0; j < 8 ; j++ {
			if list[i][j] != firstChar {
				now = false
				break
			}
		}

		if now {
			result++;
		}
	}

	for i := 0; i < 8 ; i++ {
		now := true
		firstChar := list[0][i]

		for j := 0; j < 8 ; j++ {
			if list[j][i] != firstChar {
				now = false
				break
			}
		}

		if now {
			result++;
		}
	}

	fmt.Println(result)
}


package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)

	var list [8][8]string

	result := 0

	for i := 0; i < 8 ; i++ {
		input, _ := reader.ReadString('\n')

		for j := 0; j < 8; j++ {
			list[i][j] = string(input[j])
		}
	}

	for i := 0; i < 8 ; i++ {
		now := true

		for j := 0; j < 8 ; j++ {
			if list[i][j] != "B" {
				now = false
				break
			}
		}

		if now {
			result++;
		}
	}

	for i := 0; i < 8 ; i++ {
		now := true

		for j := 0; j < 8 ; j++ {
			if list[j][i] != "B" {
				now = false
				break
			}
		}

		if now {
			result++;
		}
	}

	if result > 8 {
		result = 8
	}

	fmt.Println(result)
}


package main
import "fmt"
func main() {
    var n int
    fmt.Scan(&n)
    if n == 1 {
        fmt.Println(0)
        return
    }
    var gpp int64
    var gp int64 = 0
    var g int64 = 1
    for i := 2; i < n; i++ {
        gpp = gp
        gp = g
        g = 2 * gp + 3 * gpp % 1000000007
    }
    fmt.Println(3 * g % 1000000007)

    return
}


package main
import "fmt"
func main() {
    var n int
    fmt.Scan(&n)
    if n == 1 {
        fmt.Println(0)
        return
    }
    var fpp int64
    var fp int64 = 0
    var f int64 = 3
    for i := 3; i <= n; i++ {
        fpp = gp
        fp = g
        f = (2 * fp + 3 * fpp) % 1000000007
    }
    fmt.Println(3 * f % 1000000007)

    return
}


package main
import "fmt"
func main() {
    var n int
    fmt.Scan(&n)
    if n == 1 {
        fmt.Println(0)
        return
    }
    var fpp int64
    var fp int64 = 0
    var f int64 = 3
    for i := 3; i <= n; i++ {
        fpp = fp
        fp = f
        f = (2 * fp + 3 * fpp) % 1000000007
    }
    fmt.Println(3 * f % 1000000007)

    return
}


package main

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

func solve() {
	a := readUint64() * uint64(10000000000000)
	b := readUint64()
	c := readUint()

	d := a / b
	for i, ch := range fmt.Sprintf("%013v", d) {
		v := ch - '0'
		if uint(v) == c {
			fmt.Println(i + 1)
			return
		}
	}
	fmt.Println("-1")
}

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 readUint() uint {
	val, _ := strconv.ParseUint(readString(), 10, 32)
	return uint(val)
}

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

func readUint64() uint64 {
	val, _ := strconv.ParseUint(readString(), 10, 64)
	return val
}


package main

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

var scanner *bufio.Scanner
var t[1e5] 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 main() {
	init_scanner()
	a, b, c := readInt(), readInt(), readInt()
	for i := 0; ; i++ {
		a *= 10
		d := a/b
		if d == c {
			fmt.Println(i+1)
			return
		}
		if t[d] {
			break
		}
		t[d] = true
		a %= b
	}
	fmt.Println(-1)
}


package main

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

var scanner *bufio.Scanner
var t[1e5] 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 main() {
	init_scanner()
	a, b, c := readInt(), readInt(), readInt()
	for i := 0; ; i++ {
		a *= 10
		d := a/b
		if d == c {
			fmt.Println(i+1)
			return
		}
		if t[a] {
			break
		}
		t[a] = true
		a %= b
	}
	fmt.Println(-1)
}


package main

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

const (
	MAXN = 110
)

var N int
var A [MAXN]int

func f(left int) int {
	for i := left; i < N; i++ {
		// fmt.Print(i, A[i])
		if A[i] == 1 {
			return i
		}
	}
	return -1
}
func main() {
	fsc := NewFastScanner()
	N = fsc.NextInt()
	ok := false
	for i := 0; i < N; i++ {
		A[i] = fsc.NextInt()
		if A[i] == 1 {
			ok = true
		}
	}
	var result int64
	result = 1
	var left, right int
	left, right = 0, 0

	for {
		left = f(left)
		right = f(left + 1)
		// fmt.Println(left, right)
		if left == -1 || right == -1 {
			break
		}
		// fmt.Println(left, right)
		result *= int64((right - left) - 1)
		left = right
	}
	if ok == false {
		result = 0
	}
	fmt.Println(result)
}

//template
type FastScanner struct {
	r   *bufio.Reader
	buf []byte
	p   int
}

func NewFastScanner() *FastScanner {
	rdr := bufio.NewReaderSize(os.Stdin, 1024)
	return &FastScanner{r: rdr}
}
func (s *FastScanner) Next() string {
	s.pre()
	start := s.p
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			break
		}
	}
	result := string(s.buf[start:s.p])
	s.p++
	return result
}
func (s *FastScanner) NextLine() string {
	s.pre()
	start := s.p
	s.p = len(s.buf)
	return string(s.buf[start:])
}
func (s *FastScanner) NextInt() int {
	v, _ := strconv.Atoi(s.Next())
	return v
}
func (s *FastScanner) NextInt64() int64 {
	v, _ := strconv.ParseInt(s.Next(), 10, 64)
	return v
}

func (s *FastScanner) pre() {
	if s.p >= len(s.buf) {
		s.readLine()
		s.p = 0
	}
}
func (s *FastScanner) readLine() {
	s.buf = make([]byte, 0)
	for {
		l, p, e := s.r.ReadLine()
		if e != nil {
			panic(e)
		}
		s.buf = append(s.buf, l...)
		if !p {
			break
		}
	}
}


// 284B
package main

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

func main() {
	in := bufio.NewScanner(os.Stdin)
	nm := 3
	st := make([]int, nm)
	var n int
	var ln string
	in.Scan()
	n, _ = strconv.Atoi(in.Text())
	ln = in.Text()
	for i := 0; i < n; i++ {
		if ln[i] == 'F' {
			st[0]++
		}
		if ln[i] == 'I' {
			st[1]++
		}
		if ln[i] == 'A' {
			st[2]++
		}
	}
	var out int
	out = 0
	if st[1] == 0 {
		out = n - (st[0])
	}
	if st[1] == 1 {
		out = 1
	}
	fmt.Println(out)
}


package main

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

func main() {
	n, _ := strconv.ParseInt(os.Args[1], 10, 32)
	k, _ := strconv.ParseInt(os.Args[2], 10, 32)

	mod := n % k
	fmt.Println(n + (k - mod))
}


package main

import (
	"fmt"
	"math"
)

func my_min( x , y int ) ( ret int ) {
	if x < y {
		ret = x ;
	} else {
		ret = y ;
	}

	return ;
}

func solve( n , k , lim int ) ( res int ) {
	res = k ;

	for i := 2; i <= lim ; i ++ {
		if (k % i) == 0 {
			ot := k / i ;

			if i > n {
				res = my_min( res , i ) ;
			}

			if ot > n {
				res = my_min( res , ot ) ;
			}
		}
	}

	return ;
}

func main() {

	var n , k int ;

	fmt.Scanf("%d %d",&n,&k)

	var lim int ;
	var vv float64 ;
	vv = math.Sqrt(float64(k)) ;

	lim = int(vv);

	res := solve( n , k , lim ) ;

	fmt.Println(res);
}


package main

import "fmt"
import "math"

func main() {
	var n, k uint64
  fmt.Scanf("%d %d \n", &n, &k)
  if k == 1 {
    fmt.Println(n)
  } else {
    count := math.Trunc(math.Log2(float64(n))) + 1
    k = uint64(math.Pow(2, float64(count))) - 1
    fmt.Println(k)
  }
}


package main

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

func main() {
	var n, k int64
	stdio := bufio.NewReader(os.Stdin)
	fmt.Fscanf(stdio, "%d %d", &n, &k)

	if n == 1 {
		fmt.Println(n)
		return
	}
	binStr := strings.Replace(strconv.FormatInt(n, 2), "0", "1", -1)
	num, _ := strconv.ParseInt(binStr, 2, 64)
	fmt.Println(num)
}


package main

import (
    "fmt"
    "math"
)

func main() {
    var n, k uint64
    fmt.Scanln(&n, &k)
    if k == 1 || n == 1 {
        fmt.Println(n)
    } else {
        var degree_2 uint64 = uint64(math.Log2(float64(n)))
        result := (1 << (degree_2 + 1)) - 1
        fmt.Println(result)
    }
}


package main
import (
    "fmt"
    "math"
)

func main() {
    var n, k uint64
    fmt.Scanln(&n, &k)
    if k == 1 || n == 1 {
        fmt.Println(n)
    } else {
        var degree_2 uint64 = uint(math.Log2(float64(n)))
        result := (1 << (degree_2 + 1)) - 1
        fmt.Println(result)
    }
}


package main

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

var input *bufio.Reader

func main() {
	input = bufio.NewReader(os.Stdin)
	var n, m int32
	fmt.Fscanf(input, "%d%d\n", &n, &m)
	fmt.Println(2 * (n + m - 1))
}


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 {
			fmt.Printf("Yes\n")
			return
		}
	}

	fmt.Printf("No\n")
}


package main

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

func main() {
	s := bufio.NewScanner(os.Stdin)
	s.Scan()
	line := s.Text()
	tokens := strings.Split(line, " ")
	a, _ := strconv.Atoi(tokens[0])
	x, _ := strconv.Atoi(tokens[1])
	y, _ := strconv.Atoi(tokens[2])
	fmt.Println(findSquare(a, x, y))
}

func findSquare(a, x, y int) int {
	ha := a
	a *= 2
	x *= 2
	y *= 2

	if -ha < x && x < ha && 0 < y && y < a {
		return 1
	}

	if -ha < x && x < ha && a < y && y < 2*a {
		return 2
	}

	if -a < x && x < 0 && 2*a < y && y < 3*a {
		return 3
	}

	if 0 < x && x < a && 2*a < y && y < 3*a {
		return 4
	}

	if -ha < x && x < ha && 3*a < y && y < 4*a {
		return 5
	}

	if -a < x && x < 0 && 4*a < y && y < 5*a {
		return 6
	}

	if 0 < x && x < a && 4*a < y && y < 5*a {
		return 7
	}

	return -1
}


package main

import "fmt"

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

	if n%2 == 0 {
		fmt.Println(n/2 - 1)
	} else {
		fmt.Println(n/2 - 2)
	}

}


// package main

// import "fmt"
// import "sort"

// func max(a int, b int) bool {
// 	return a > b;
// }

// func main() {
// 	var n int
// 	var inicio int
// 	var fim int

// 	fmt.Scan(&n, &inicio, &fim)

// 	array := make([]int64, n)

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

// 	slice := array[inicio-1 : fim]

// 	sort.Slice(slice, max)

// 	for i := 0; i < n; i++ {
// 		if i > 0 {
// 			fmt.Print(" ")
// 		}
// 		fmt.Print(array[i])
// 	}
// 	fmt.Println()
// }
package main

import "fmt"

func main() {
	var distancia int
	passos := 0

	fmt.Scan(&distancia)

	if distancia % 5 == 0 {
		passos += distancia / 5
		distancia -= distancia / 5
	} else if distancia % 4 == 0 {
		passos += distancia / 4
		distancia -= distancia / 4
	} else if distancia % 3 == 0 {
		passos += distancia / 3
		distancia -= distancia / 3
	} else if distancia % 2 == 0 {
		passos += distancia / 2
		distancia -= distancia / 2
	} else {
		passos += distancia;
		distancia = 0
	}
	fmt.Println(passos)
}


package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	c := n / 2 + n % 2
	step := n / 5
	if n % 5 > 0 {
	    step++
	}
	fmt.Print(step)
}


package main

import (
    "fmt"
    "os"
)

func main() {
    var a int
    scanf("%d\n", &a)
    steps := Problem617A(a)
	printf(steps)
}

func Problem617A(position int) (steps int) {
	steps = 0
	for curr := 5; curr > 0; curr-- {
		for position >= curr {
			steps++
			position-=curr
		}
	}
	return
}

func printf(format string, x ...interface{}) {
	fmt.Fprintf(os.Stdout, format, x...)
}

func scanf(format string, x ...interface{}) {
	if _, err := fmt.Fscanf(os.Stdin, format, x...); err != nil {
		panic(err)
	}
}


// Steven Phillips / elimisteve
// 2016.01.23

package main

import (
	"bufio"
	"os"
	"regexp"
	"strconv"
	"strings"
)

func main() {
	println(Run(PluckInt(Line())))
}

func Run(x int) int {
	answer := x / 5
	if x%5 > 0 {
		answer += 1
	}
	return answer
}

// Helpers

var read = bufio.NewReader(os.Stdin)

func Line() string {
	s, err := read.ReadString('\n')
	if err != nil {
		panic(err)
	}
	return s[:len(s)-1]
}

var regexNum = regexp.MustCompile(`\d+`)

func PluckInt(nStr string) int {
	return Int(regexNum.FindString(nStr))
}

func Int(numStr string) int {
	numStr = strings.TrimSpace(numStr)
	num, err := strconv.Atoi(numStr)
	if err != nil {
		panic(err)
	}
	return num
}


package main

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

func main() {
	var n,m int
	in := bufio.NewReader(os.Stdin)
	fmt.Fscanf(in, "%d %d\n", &n, &m)
	if check(n,m){
		fmt.Println("YES")
	}else{
		fmt.Println("NO")
	}
}
func check(n int, m int) bool{
	for i:= n + 1; i <= m; i++{
		if checkPrime(i) == m{
			return true
		}
	}
	return false
}
func checkPrime(a int) int{
	for k:= 2; k < a; k++{
		if a % k == 0{
			return -1
		}
	}
	return a
}


package main

import "fmt"

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

	is_prime := make([]int, 51, 51)
	for i := 0; i < 51; i++ {
		is_prime[i] = 1
	}
	is_prime[1] = 0
	for i := 2; i <= 8; i++ {
		if is_prime[i] == 1 {
			for x := i + i; x < 51; x += i {
				is_prime[x] = 0
			}
		}
	}

	ans := false
	for i := n + 1; i < 51; i++ {
		if is_prime[i] == 1 {
			if i == m {
				ans = true
			}
		}
	}

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


package main

import (
	"fmt"
	"sort"
)

func sum(x int64) int64 {
	res := int64(0)
	for x > 0 {
		res += x % 10
		x /= 10
	}
	return res
}

func main() {
	var b, c int64
	var a int
	fmt.Scan(&a, &b, &c)
	var res []int
	for s := int64(1); s <= 9*9; s++ {
		r := s
		for i := 1; i < a; i++ {
			r *= s
		}
		r = b*r + c
		if sum(r) == s {
			res = append(res, int(r))
		}
	}

	sort.Ints(res)
	fmt.Println(len(res))
	for i, r := range res {
		fmt.Print(r)
		if i == len(res)-1 {
			fmt.Print("\n")
		} else {
			fmt.Print(" ")
		}
	}
}


package main

import (
	"fmt"
	"strconv"
	"strings"
)

// x = b·s(x)^a + c

func main() {
	const max_digits int64 = 9

	var a, b, c int64
	if _, err := fmt.Scanf("%d %d %d\n", &a, &b, &c); err != nil {
		return
	}

	cnt := 0
	var all_res []string

	for i := int64(1); i < max_digits*max_digits; i++ {
		y := b*power(i, a) + c
		if s(y) == i {
			cnt++
			all_res = append(all_res, strconv.FormatInt(y, 10))
		}
	}

	fmt.Println(cnt)
	fmt.Println(strings.Join(all_res, " "))
}

func s(x int64) int64 {
	res := int64(0)
	for x > 0 {
		res += x % 10
		x /= 10
	}
	return res
}

func power(sx, n int64) int64 {
	res := sx
	for i := int64(1); i < n; i++ {
		res *= sx
	}
	return res
}


package main

import "bufio"
import "os"
import "fmt"
import "math"

func Read(s *bufio.Reader) string {
    line, _ := s.ReadString('\n')
    return line
}

func Write(s *bufio.Writer, a ...interface{}) {
    fmt.Fprintln(s, a...)
    s.Flush()
}

func Sum(x int64) int64 {
    var result int64
    for x != 0 {
        result += int64(math.Mod(float64(x), 10.0))
        x = x / 10
    }

    return result
}

func main() {
    reader := bufio.NewReader(os.Stdin)

    var a, b, c int64
    line, _ := reader.ReadString(' ')
    fmt.Sscanln(line, &a)
    line, _ = reader.ReadString(' ')
    fmt.Sscanln(line, &b)
    fmt.Sscanln(Read(reader), &c)

    writer := bufio.NewWriter(os.Stdout)
    // s(x) can be from 1 to 81
    var result []int64
    for i := 1; i <= 81; i++ {
        right := b * int64(math.Pow(float64(i), float64(a))) + c
        if right < 1000000000 {
            left := Sum(right)

            if left == int64(i) {
                Write(writer, left, right)
                result = append(result, right)
            }
        }
    }

    Write(writer, len(result))
    for i := range result {
        fmt.Fprint(writer, result[i])
        fmt.Fprint(writer, " ")
    }

    writer.Flush()
}


package main

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

func S(x int64) int64 {
	var res int64 = 0
	for x != 0 {
		res += x % 10
		x /= 10
	}
	return res
}

func Pow(x, a int64) int64 {
	var res int64 = 1
	for i := 0; int64(i) < a; i++ {
		res *= x
	}
	return res
}

func main() {
	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)
	var a, b, c int64
	fmt.Fscan(reader, &a, &b, &c)
	var num_res = 0
	var res []int64 = make([]int64, 40)
	for i := 1; i < 40; i++ {
		var x int64 = b*Pow(int64(i), a) + c
		if x < 1000000000 && S(x) == int64(i) {
			res[num_res] = x
			num_res++
		}
	}
	fmt.Fprintln(writer, num_res)
	for i := 0; i < num_res; i++ {
		fmt.Fprintf(writer, "%d ", res[i])
	}
	fmt.Fprintln(writer)
	writer.Flush()
}


package main

import (
	"fmt"
	"sort"
)

func main() {
	var n, m int
	var ans int = 10000
	fmt.Scan(&n, &m)
	inputs := make([]int, m)
	for i:=0; i<m; i++ {
		fmt.Scan(&inputs[i])
	}
	sort.Ints(inputs)
	for i:=0; i+n-1<m; i++ {
		if inputs[i+n-1]-inputs[i] < ans {
			ans = inputs[i+n-1]-inputs[0]
		}
	}
	fmt.Println(ans)
}


package main

import (
	"fmt"
	"strings"
)

func main() {
	var n int
	fmt.Scan(&n)
	var altScore [n]int
	var s string
	fmt.Scan(&s)
	var defaultScore [n]uint8
	d := 1
	defaultScore[0] = 1
	for i := 1; i < n; i++ {
		if s[i] != s[i+1] {
			d++
		}
		defaultScore[i] = d
	}
	for i := 0; i < n; i++ {

	}

	fmt.Print(d)
}


package main

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

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

func main() {
	A := 4
	B := 1001
	var n,m int
	scanf("%d %d\n",&n, &m)
	f := make([]int, m)
	for i := 0; i < m; i++ {
		scanf("%d",&f[i])
	}
	sort.Ints(f)
	for i, v := range f {
		if i < n {
			if v > A {
				A = v
			}

			if v < B {
				B = v
			}
		}
	}
	printf("%d", A-B)
}

func printf(format string, x ...interface{}) {
	fmt.Fprintf(os.Stdout, format, x...)
}

func scanf(format string, x ...interface{}) {
	if _, err := fmt.Fscanf(os.Stdin, format, x...); err != nil {
		panic(err)
	}
}


package main
import
(
  "fmt"
  // "math"
)
func main(){
 var i int
 fmt.Scanf("%d" , &i)
 // temp:= i
 x :=1
 count := 0
 var s []int
 for ;x<i;x++{
   if ((i-x)>81){
     continue
   }
   temp := x
    rs := (i-x)
    // temp2 :=1
    // fmt.Println(x)
    sum :=0
   for ;temp>0;temp/=10{

    // fmt.Println(mult)
  //  var digits [] int

     xlast := temp%10
     sum +=xlast

    //  res := temp + xlast
    //  fmt.Println(temp,xlast)

   }
   if sum==rs{
     s = append(s,x)
        count ++
   }
 }
 if (count == 0){
fmt.Println(0)
}else
{
  for x:=0;x<count;x++{
    fmt.Println(count)
    fmt.Println(s[x])
  }
}
}


package main
import
(
  "fmt"
  // "math"
)
func main(){
 var i int
 fmt.Scanf("%d" , &i)
 // temp:= i
 x := 0
 count := 0
 var s []int

 for ;x<i;x++{
   temp := x
    rs := (i-x)
    // temp2 :=1
    // fmt.Println(x)
    sum :=0
   for ;temp>0;temp/=10{

    // fmt.Println(mult)
  //  var digits [] int

     xlast := temp%10
     sum +=xlast

    //  res := temp + xlast
    //  fmt.Println(temp,xlast)

   }
   if sum==rs{
     s = append(s,x)
        count ++
   }
 }
 if (count == 0){
fmt.Println(0)
}else
{
  for x:=0;x<count;x++{
    fmt.Println(count)
    fmt.Println(s[x])
  }
}
}


package main

import (
         "fmt"
       )

func main() {
    var n,a,b,c int64
    fmt.Scanf("%v\n", &n)
    fmt.Scanf("%v\n", &a)
    fmt.Scanf("%v\n", &b)
    fmt.Scanf("%v\n", &c)

    bTotal := int64(0)
    if a >= b - c {
        for n >= 0 {
            Lb := int64(n/b)
            if Lb == 0 {
                break
            }
            n -= Lb*b
            n += c*Lb
            bTotal += Lb
            //fmt.Printf("%v %v\n", n, bTotal)
        }
        bTotal += int64(n/a)
    } else {
        bTotal = int64(n/a)
    }
    fmt.Printf("%v", bTotal)
}


package main

import (
         "fmt"
       )

func main() {
    var n,a,b,c int64
    fmt.Scanf("%v\n", &n)
    fmt.Scanf("%v\n", &a)
    fmt.Scanf("%v\n", &b)
    fmt.Scanf("%v\n", &c)

    bTotal := int64(0)
    if a > b - c && n > b{
        /*for n >= 0 {
            Lb := int64(n/b)
            if Lb == 0 {
                break
            }
            n -= Lb*b
            n += c*Lb
            bTotal += Lb
            //fmt.Printf("%v %v\n", n, bTotal)
        }*/

        bTotal += int64((n-c)/(b-c))
        if bTotal < 0 {
            fmt.Printf("0")
            return
        }
        n -= bTotal*(b-c)
        bTotal += int64(n/a)
    } else if n > a {
        bTotal = int64(n/a)
    } else if n > b {
        bTotal = int64(n/b)
    }
    fmt.Printf("%v", bTotal)
}


package main

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

func main() {
	reader := bufio.NewReaderSize(os.Stdin, 1<<13)
	writer := bufio.NewWriterSize(os.Stdout, 1<<13)
	n, a, b, c := ReadInt64(reader), ReadInt64(reader), ReadInt64(reader), ReadInt64(reader)
	ans := min(solve(4-n%4, a, b, c), solve(8-n%4, a, b, c))
	fmt.Fprintln(writer, ans)
	writer.Flush()
}

func solve(n, a, b, c int64) int64 {
	if n < 0 {
		return 1e10
	}
	if n%4 == 0 {
		return 0
	}
	ans := solve(n-1, a, b, c) + a
	ans = min(ans, solve(n-2, a, b, c)+b)
	ans = min(ans, solve(n-3, a, b, c)+c)
	return ans
}

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

func ReadInt(reader *bufio.Reader) int {
	return int(ReadInt64(reader))
}

func ReadInt64(reader *bufio.Reader) int64 {
	b, err := reader.ReadByte()
	for !isValid(b, err) {
		b, err = reader.ReadByte()
	}
	var res int64
	for isValid(b, err) {
		res = res*10 + int64(b-'0')
		b, err = reader.ReadByte()
	}
	return res
}

func isValid(b byte, err error) bool {
	return err == nil && '0' <= b && b <= '9'
}


package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	arr := [16]int{}
	rems := [4]int{}
	for i := 1; i < 4; i++ {
		fmt.Scan(&rems[i])
	}
	arr[n%4] = 1
	for i := 0; i < 12; i++ {
		if arr[i] > 0 {
			for j := 1; j < 4; j++ {
				if arr[i+j] == 0 || arr[i+j] > arr[i]+rems[j] {
					arr[i+j] = arr[i] + rems[j]
				}
			}
		}
	}
	ans := 1
	for i := 0; i < 16; i++ {
		if arr[i] > 0 && arr[i] < ans {
			ans = arr[i]
		}
	}
	fmt.Println(ans)
}


package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	arr := [3]int{}
	for i := 0; i < 3; i++ {
		fmt.Scan(&arr[i])
	}
	rems := [4]int{}
	rems[n] = 1
	for i := 0; i < 3; i++ {
		for rem := 0; rem < 4; rem++ {
			newindex := (rem + i + 1) % 4
			if rems[newindex] == 0 || rems[newindex] > rems[rem]+arr[i] {
				rems[newindex] = rems[rem] + arr[i]
			}
		}
	}
	fmt.Println(rems[0] - 1)
}


package main

import "fmt"

func main() {
	var n, a, b, c, res int64
	fmt.Scan(&n, &a, &b, &c)
	r := n % 4
	switch r {
	case 0:
		res = 0
	case 1:
		res = min(3*a, 2*b+1, c)
	case 2:
		res = min(2*a, b, 2*c)
	case 3:
		res = min(a, c+b)
	}
	fmt.Println(res)
}

func min(a ...int64) int64 {
	min := a[0]
	for _, n := range a {
		if n < min {
			min = n
		}
	}
	return min
}


package main

import (
	"fmt"
)

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

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

	impossible := func() bool {
		switch n {
		case 1:
			if s > 9 {
				return true
			}
		default:
			if s == 0 || s > 9*n {
				return true
			}
		}
		return false
	}

	if impossible() {
		fmt.Println("-1 -1")
		return
	}

	largest := func() string {
		d := make([]int, n)
		x := s
		for i := 0; i < n; i++ {
			d[i] = min(x, 9)
			x -= d[i]
		}
		res := make([]rune, n)
		for i := 0; i < n; i++ {
			res[i] = rune(d[i] + '0')
		}
		return string(res)
	}

	smallest := func() string {
		if n == 1 {
			return fmt.Sprintf("%d", s)
		}
		d := make([]int, n)

		x := s
		k := 0
		if s < 9*(n-1)+1 {
			d[0] = 1
			k = 1
		}
		for i := n - 1; i >= k; i-- {
			d[i] = min(x, 9)
			x -= d[i]
		}
		res := make([]rune, n)
		for i := 0; i < n; i++ {
			res[i] = rune(d[i] + '0')
		}
		return string(res)
	}

	fmt.Println(smallest(), largest())
}


package main

import "fmt"

func main() {
    var x,y,m int64
    fmt.Scan(&x,&y,&m)
    ans := int64(0)
    for (x < m) && (y < m) {
        if (x < y) {
            if (x+y) <= x {
                ans = -1
                break
            } else {
                x += y
            }
        } else {
            if (y+x) <= y {
                ans = -1
                break
            } else {
                y += x
            }
        }
        ans++
    }
    fmt.Println(ans)
}


package main

import (
	"fmt"
	"math"
)

func scanInput() (int64, int64, int64) {
	var x, y, m int64
	fmt.Scanf("%d %d %d\n", &x, &y, &m)
	return x, y, m
}

func fibo(x, y, m int64) int64 {
	var n int64
	if n = 0; x < m && y < m && (x+y) <= y && (x+y) <= x {
		n = -1
		return n
	} else if math.Signbit(float64(x)) != math.Signbit(float64(y)) {
		if x > y {
			x, y = y, x
		}
		n = (-x) / y
		x = -((-x) % y)
	}

	for x < m && y < m {
		t := x + y
		if x < y {
			x = t
		} else {
			y = t
		}
		n++
	}
	return n
}

func main() {
	x, y, m := scanInput()
	n := fibo(x, y, m)
	fmt.Printf("%d\n", n)
}


package main

import "fmt"

func scanInput() (int64, int64, int64) {
	var x, y, m int64
	fmt.Scanf("%d %d %d\n", &x, &y, &m)
	return x, y, m
}

func fibo(x, y, m int64) int64 {
	var n int64
	if n = 0; x < m && y < m && (x+y) <= y && (x+y) <= x {
		n = -1
		return n
	}
	for x < m && y < m {
		t := x + y
		if x < y {
			x = t
		} else {
			y = t
		}
		n++
	}
	return n
}

func main() {
	x, y, m := scanInput()
	n := fibo(x, y, m)
	fmt.Printf("%d\n", n)
}


package main

import (
	"fmt"
	"math"
)

func scanInput() (int64, int64, int64) {
	var x, y, m int64
	fmt.Scanf("%d %d %d\n", &x, &y, &m)
	return x, y, m
}

func fibo(x, y, m int64) int64 {
	var n int64
	if n = 0; x < m && y < m && (x+y) <= y && (x+y) <= x {
		n = -1
		return n
	} else if math.Signbit(float64(x)) != math.Signbit(float64(y)) {
		if x > y {
			x, y = y, x
		}
		n = (-x) / y
		x = -((-x) % y)
	}

	for x < m && y < m {
		t := x + y
		if x < y {
			x = t
		} else {
			y = t
		}
		n++
	}
	return n
}


package main

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

func main() {
	bs, _ := ioutil.ReadAll(os.Stdin)
	reader := bytes.NewBuffer(bs)
	var dd, mm, yy, bd, bm, by int
	fmt.Fscanf(reader, "%d.%d.%d\n", &dd, &mm, &yy)
	fmt.Fscanf(reader, "%d.%d.%d\n", &bd, &bm, &by)
	by += 18
	if yy > by || (yy == by && mm > bm) || (yy == by && mm == bm && dd >= bd) {
		fmt.Printf("YES")
	} else {
		fmt.Printf("NO")
	}
}


package main

import (
	"fmt"
)

func main() {
	var a,b string
	fmt.Scan(a,b)
	if(a = b){
		fmt.Println(a)
	}
	else {
		fmt.Println(1)
	}
}


package main

import (
   "fmt"
)

func main() {
   var s1, s2 string
   fmt.Scanf("%s %s", &s1, &s2)

   if s1 == s2 {
      fmt.Println(s1)
   } else {
      fmt.Println(s2)
   }
}


package main

import (
  "fmt"
  "math/big"
  "strconv"
  "strings"
)

func stringToInt(s string) *big.Int {
  a := big.NewInt(0)
  for _, c := range s {
    a.Mul(a, big.NewInt(10))
    i, _ := strconv.Atoi(string(c))
    a.Add(a, big.NewInt(int64(i)))
  }
  return a
}

func main() {
  var a, b string
  fmt.Scan(&a, &b)
  a = strings.Trim(a, " ")
  b = strings.Trim(b, " ")
  x := stringToInt(a)
  y := stringToInt(b)
  fmt.Println(x.GCD(nil,nil, x, y))
}


package main

import "fmt"

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

	if a == b {
		fmt.Println(a)
	} else {
		fmt.Println(a)
	}
}


package main

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

func main() {
	n := ReadInt64()
	a := ReadInt64s(3)
	b := ReadInt64s(3)
	min, max := solve(n, a, b)
	fmt.Printf("%d %d\n", min, max)
}

func solve(n int64, a, b []int64) (int64, int64) {
	max := int64(0)
	Min = Min(a[0], b[1]) + Min(a[1], b[2]) + Min(a[2], b[0])

	cnt := int64(0)
	cnt += Min(a[0], b[1]+b[2]) + Min(a[1], b[2]+b[0]) + Min(a[2], b[0]+b[1])
	min := n - cnt

	return min, max
}

func Min(xs ...int) int {
	min := xs[0]
	for _, x := range xs[1:] {
		if min > x {
			min = x
		}
	}
	return min
}

var reader = bufio.NewReader(os.Stdin)

func Scan(a ...interface{}) {
	if _, err := fmt.Fscan(reader, a...); err != nil {
		panic(err)
	}
}
func ReadString() (s string) { Scan(&s); return }
func ReadInt() (i int)       { Scan(&i); return }
func ReadInts(n int) []int {
	v := make([]int, n)
	for i := 0; i < n; i++ {
		Scan(&v[i])
	}
	return v
}
func ReadInt64() (i int64) { Scan(&i); return }
func ReadInt64s(n int) []int64 {
	v := make([]int64, n)
	for i := 0; i < n; i++ {
		Scan(&v[i])
	}
	return v
}


package main

import "fmt"

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

func gcd(a, b int64) int64 {
	var r int64
	if b > a {
		a, b = b, a
	}
	for {
		r = a % b
		if r == 0 {
			break
		}
		a = b
		b = r
	}
	return b
}

func main() {
	var t,w,b int64
	fmt.Scanf("%d %d %d",&t,&w,&b)
    p:=gcd(w,b)
    qw:=w/p
    qb:=b/p
    k:=t/p/qw/qb
    m:=min(w,b)-1
    r:=k + m*k + min(m,t-k*p*qw*qb)
    rt:=gcd(r,t)
    r,t=r/rt,t/rt
    fmt.Printf("%d/%d\n",r,t)
}


package main

import "fmt"

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

func gcd(a, b int64) int64 {
	var r int64
	if b > a {
		a, b = b, a
	}
	for {
		r = a % b
		if r == 0 {
			break
		}
		a = b
		b = r
	}
	return b
}

func main() {
	var t,w,b int64
	fmt.Scanf("%d %d %d",&t,&w,&b)
    p:=gcd(w,b)
    qw:=w/p
    qb:=b/p
    k:=t/p/qw/qb
    m:=min(w,b)-1
    r:=k + m*k + min(m,t-k*p*qw*qb)
    if r>0 {
	    rt:=gcd(r,t)
    	r,t=r/rt,t/rt
	}
    fmt.Printf("%d/%d\n",r,t)
}


package a50

import "fmt"

func main() {
	m, n := 0, 0

	fmt.Scanln(&m)
	fmt.Scanln(&n)

	fmt.Println(" ", m*n/2)
}


// A. Bear and Reverse Radewoosh
/*
Limak and Radewoosh are going to compete against each other in the upcoming algorithmic contest. They are equally skilled but they won't solve problems in the same order.

There will be n problems. The i-th problem has initial score p i and it takes exactly t i minutes to solve it. Problems are sorted by difficulty — it's guaranteed that p i < p i + 1 and t i < t i + 1.

A constant c is given too, representing the speed of loosing points. Then, submitting the i-th problem at time x ( x minutes after the start of the contest) gives max(0,  p i - c·x) points.

Limak is going to solve problems in order 1, 2, ..., n (sorted increasingly by p i). Radewoosh is going to solve them in order n, n - 1, ..., 1 (sorted decreasingly by p i). Your task is to predict the outcome — print the name of the winner (person who gets more points at the end) or a word "Tie" in case of a tie.

You may assume that the duration of the competition is greater or equal than the sum of all t i. That means both Limak and Radewoosh will accept all n problems.

Input
The first line contains two integers n and c (1 ≤ n ≤ 50, 1 ≤ c ≤ 1000) — the number of problems and the constant representing the speed of loosing points.

The second line contains n integers p 1, p 2, ..., p n (1 ≤ p i ≤ 1000, p i < p i + 1) — initial scores.

The third line contains n integers t 1, t 2, ..., t n (1 ≤ t i ≤ 1000, t i < t i + 1) where t i denotes the number of minutes one needs to solve the i-th problem.

Output

Print "Limak" (without quotes) if Limak will get more points in total. Print "Radewoosh" (without quotes) if Radewoosh will get more points in total. Print "Tie" (without quotes) if Limak and Radewoosh will get the same total number of points.

Examples
Input
3 2
50 85 250
10 15 25

Output
Limak

Input
3 6
50 85 250
10 15 25

Output
Radewoosh

Input
8 1
10 20 30 40 50 60 70 80
8 10 58 63 71 72 75 76

Output
Tie

Note
In the first sample, there are 3 problems. Limak solves them as follows:

    Limak spends 10 minutes on the 1-st problem and he gets 50 - c·10 = 50 - 2·10 = 30 points.
    Limak spends 15 minutes on the 2-nd problem so he submits it 10 + 15 = 25 minutes after the start of the contest. For the 2-nd problem he gets 85 - 2·25 = 35 points.
    He spends 25 minutes on the 3-rd problem so he submits it 10 + 15 + 25 = 50 minutes after the start. For this problem he gets 250 - 2·50 = 150 points.

So, Limak got 30 + 35 + 150 = 215 points.

Radewoosh solves problem in the reversed order:

    Radewoosh solves 3-rd problem after 25 minutes so he gets 250 - 2·25 = 200 points.
    He spends 15 minutes on the 2-nd problem so he submits it 25 + 15 = 40 minutes after the start. He gets 85 - 2·40 = 5 points for this problem.
    He spends 10 minutes on the 1-st problem so he submits it 25 + 15 + 10 = 50 minutes after the start. He gets max(0, 50 - 2·50) = max(0,  - 50) = 0 points.

Radewoosh got 200 + 5 + 0 = 205 points in total. Limak has 215 points so Limak wins.

In the second sample, Limak will get 0 points for each problem and Radewoosh will first solve the hardest problem and he will get 250 - 6·25 = 100 points for that. Radewoosh will get 0 points for other two problems but he is the winner anyway.

In the third sample, Limak will get 2 points for the 1-st problem and 2 points for the 2-nd problem. Radewoosh will get 4 points for the 8-th problem. They won't get points for other problems and thus there is a tie because 2 + 2 = 4.
*/
package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	input1, _ := reader.ReadString('\n')
	n, _ := strconv.Atoi(string(input1[0]))
	c, _ := strconv.Atoi(string(input1[2]))

	input2, _ := reader.ReadString('\n')
	pArr := strings.Split(strings.TrimSpace(input2), " ")

	input3, _ := reader.ReadString('\n')
	tArr := strings.Split(strings.TrimSpace(input3), " ")

	lt, lpt, rt, rpt := 0, 0, 0, 0
	for i := 0; i < n; i++ {
		p1, _ := strconv.Atoi(pArr[i])
		t1, _ := strconv.Atoi(tArr[i])
		lpt += t1
		lt += max(0, p1-c*lpt)

		p2, _ := strconv.Atoi(pArr[n-1-i])
		t2, _ := strconv.Atoi(tArr[n-1-i])
		rpt += t2
		rt += max(0, p2-c*rpt)
	}

	if lt > rt {
		fmt.Print("Limak")
	} else if lt < rt {
		fmt.Print("Radewoosh")
	} else {
		fmt.Print("Tie")
	}
}

func max(i, j int) int {
	if i > j {
		return i
	}
	return j
}


package main

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

func isSubsequence(s, t string) bool {
	if len(s) < len(t) {
		return false
	}

	i, j := 0, 0

	for j < len(t) && i < len(s) {
		if s[i] == t[j] {
			i++
			j++
		} else {
			i++
		}
	}

	return j == len(t)
}

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

func main() {
	var (
		s, t string
	)

	// file, err := os.Open("input.txt")
	// if err != nil {
	// 	panic(err)
	// }

	// reader := bufio.NewReader(file)

	reader := bufio.NewReader(os.Stdin)

	fmt.Fscanf(reader, "%s\n", &s)
	fmt.Fscanf(reader, "%s\n", &t)

	var maxLen = -1
	for l := 0; l < len(s); l++ {
		for r := l; r < len(s); r++ {
			arr := []string{string(s[:l]), string(s[r+1:])}
			newS := strings.Join(arr, "")

			if isSubsequence(newS, t) {
				maxLen = max(r-l+1, maxLen)
			}
		}
	}

	fmt.Println(maxLen)

}


package main

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

func main(){
	var s,v1,v2,t1,t2 int
	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in,&s,&v1,&v2,&t1,&t2)
	a1 := 2*t1+s*v1
	a2 := 2*t2+s*v2
	if a1<a2{
		fmt.Println("First")
	}else if{
		fmt.Println("Second")
	}else{
		fmt.Println("Friendship")
	}
}


// A. Key races
/*
Two boys decided to compete in text typing on the site "Key races". During the competition, they have to type a text consisting of s characters. The first participant types one character in v1 milliseconds and has ping t1 milliseconds. The second participant types one character in v2 milliseconds and has ping t2 milliseconds.

If connection ping (delay) is t milliseconds, the competition passes for a participant as follows:

    Exactly after t milliseconds after the start of the competition the participant receives the text to be entered.
    Right after that he starts to type it.
    Exactly t milliseconds after he ends typing all the text, the site receives information about it.

The winner is the participant whose information on the success comes earlier. If the information comes from both participants at the same time, it is considered that there is a draw.

Given the length of the text and the information about participants, determine the result of the game.

Input
The first line contains five integers s, v1, v2, t1, t2 (1 ≤ s, v1, v2, t1, t2 ≤ 1000) — the number of characters in the text, the time of typing one character for the first participant, the time of typing one character for the the second participant, the ping of the first participant and the ping of the second participant.

Output
If the first participant wins, print "First". If the second participant wins, print "Second". In case of a draw print "Friendship".

Examples
Input
5 1 2 1 2

Output
First

Input
3 3 1 1 1

Output
Second

Input
4 5 3 1 5

Output
Friendship

Note
In the first example, information on the success of the first participant comes in 7 milliseconds, of the second participant — in 14 milliseconds. So, the first wins.

In the second example, information on the success of the first participant comes in 11 milliseconds, of the second participant — in 5 milliseconds. So, the second wins.

In the third example, information on the success of the first participant comes in 22 milliseconds, of the second participant — in 22 milliseconds. So, it is be a draw.
*/
package main

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

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

	s, _ := strconv.Atoi(string(n[0]))
	v1, _ := strconv.Atoi(string(n[2]))
	v2, _ := strconv.Atoi(string(n[4]))
	t1, _ := strconv.Atoi(string(n[6]))
	t2, _ := strconv.Atoi(string(n[8]))

	v1Total := (s * v1) + (t1 * 2)
	v2Total := (s * v2) + (t2 * 2)

	if v1Total < v2Total {
		fmt.Println("First")
	} else if v2Total < v1Total {
		fmt.Println("Second")
	} else {
		fmt.Println("Friendship")
	}
}


package main

import (
	"fmt"
)

func weirdSum(a, b int64) (int64, int64) {
	for a != 0 && b != 0 {
		if a >= 2*b {
			a %= 2 * b
			continue

		} else if b >= 2*a {
			b %= 2 * a
			continue
		}

		break
	}

	return a, b
}

func main() {
	var s, v1, v2, t1, t2 int64
	fmt.Scanf("%d %d %d %d %d", &s, &v1, &v2, &t1, &t2)

	time1 := t1*2 + s*v1
	time2 := t2*2 + s*v2

	if time1 == time2 {
		fmt.Println("Friendship")
	}

	if time1 < time2 {
		fmt.Println("First")
	} else {
		fmt.Println("Second")
	}
}


package main

import "fmt"

func main() {
    var s, v1, t1, v2, t2 int
    fmt.Scan(&s, &v1, &t1, &v2, &t2)
    a := s*v1 + 2*t1
    b := s*v2 + 2*t2
    if a < b {
        fmt.Print("First")
    } else if a > b {
        fmt.Print("Second")
    } else {
        fmt.Print("Friendship")
    }
}


package main

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

func scanInt(scanner *bufio.Scanner) int {
	scanner.Scan()
	x, _ := strconv.Atoi(scanner.Text())
	return x
}

func sign(x int) int {
	y := x
	if (y == 0) {
		return 0
	}
	if (y < 0) {
		return -1
	}
	return 1
}

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

	ax, ay := scanInt(scanner), scanInt(scanner)
	bx, by := scanInt(scanner), scanInt(scanner)
	cx, cy := scanInt(scanner), scanInt(scanner)
	x0, y0 := float64(bx-ax), float64(by-ay)
	l0 := math.Hypot(x0, y0)
	x0 /= l0
	y0 /= l0
	x1, y1 := float64(cx-bx), float64(cy-by)
	l1 := math.Hypot(x1, y1)
	x1 /= l1
	y1 /= l1
	//writer.WriteString(fmt.Sprintf("(%.8f, %.8f) (%.8f, %.8f), dot product = %.8f\n",
	//		x0, y0, x1, y1, x0*x1 + y0*y1))
	if x1 == x0 && y1 == y0 {
		writer.WriteString("TOWARDS\n")
	} else if x1 == -y0 && y1 == x0 {
		writer.WriteString("LEFT\n")
	} else {
		writer.WriteString("RIGHT\n")
	}
}


package main

import (
	"fmt"
)

func main() {
	var n, sum int

	fmt.Scanln(&n)

	for i := 1; i <= n; i++ {
		if i%2 == 0 {
			sum += i
		} else {
			sum -= i
		}
	}
	fmt.Println(sum)
}


package main

import (
	"fmt"
)

var res int

func main() {
	var q int

	fmt.Scanln(&q)
	fmt.Println(fn(q))
}

func fn(n int) int {
	if n == 1 {
		res--
		return res
	}

	if n%2 == 0 {
		res += n
	} else {
		res -= n
	}

	fn(n - 1)
	return res
}


package main
import "fmt"

func main(){
	var n int64
	var total int64
	fmt.Scanln(&n)
	for i := int64(1); i <= n; i ++ {
		if i%2 == 1 {
			total -= i
		}else {
			total += i
		}
	}
	fmt.Println(total)
}


package main

import (
	"fmt"
)

func Pow(a int, b int) int {
	num := a
	for i := 0; i < b; i++ {
		num *= a
	}
	return num
}

func main() {
	var n int
	num := 0
	_, _ = fmt.Scan(&n)
	for i := 1; i < n + 1; i++ {
		num += -Pow(-1, i) * i
	}
	fmt.Println(num)
}


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(
	"fmt"
)

func main() {
	s1 := uint64(0)
	s2 := uint64(0)
	s3 := uint64(0)
	s4 := uint64(0)
	fmt.Scanf("%d %d %d %d", s1, s2, s3, s4)

	cnt := 0

	if s1 != s2 {
		cnt += 1
	}

	if s1 != s3 {
		cnt += 1
	}

	if s1 != s4 {
		cnt += 1
	}

	fmt.println(3-cnt)
}


package main

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

func main() {
	var s1, s2, s3, s4, needToBuy int
	reader := bufio.NewReader(os.Stdin)
	fmt.Fscan(reader, &s1)
	fmt.Fscan(reader, &s2)
	fmt.Fscan(reader, &s3)
	fmt.Fscan(reader, &s4)
	if s1 == s2 {
		needToBuy++
	}
	if s2 == s3 {
		needToBuy++
	}
	if s3 == s4 {
		needToBuy++
	}
	fmt.Println(needToBuy)
}


package main

import "fmt"

func main()  {
	var s1 int
	fmt.Scan(&s1)
	var s2 int
	fmt.Scan(&s2)
	var s3 int
	fmt.Scan(&s3)
	var s4 int
	fmt.Scan(&s4)
	sAll := [4] int {s1, s2, s3, s4}
	count := 1
	for index := 0; index < 4; index++ {
		for i := index +1 ; i < 4;  i++ {
			if sAll[index] == sAll[i] {
				count++
			}
		}
	}
	if count > 4 {
		count = count - 4
	} else {
		count = count - 1
	}
	fmt.Print(count)
}


package main

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

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

	n, m := 0, 0
	if scanner.Scan() {
		line := scanner.Text()
		fmt.Sscanf(line, "%d %d", &n, &m)
	}

	if scanner.Scan() {
		line := scanner.Text()
		tokens := strings.Fields(line)
		childRequirement := make([]int, n)

		for i := 0; i < n; i++ {
			childRequirement[i], _ = strconv.Atoi(tokens[i])
		}

		childGet := make([]int, n)

		lastChild := 0
		for {
			finishes := true
			for i := 0; i < n; i++ {
				if childGet[i] < childRequirement[i] {
					childGet[i] = childGet[i] + m
					lastChild = i
				}

				if childGet[i] < childRequirement[i] {
					finishes = false
				}
			}
			if finishes {
				break
			}
		}
		fmt.Println(childGet)
		fmt.Println(lastChild + 1)
	}
}


// 437A
package main

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

func main() {
	var (
		s      string
		k      int
		a      [4]int
		b1, b2 bool
	)
	out := bufio.NewWriter(os.Stdout)
	tmp := 0
	for i := 0; i < 4; i++ {
		fmt.Scan(&s)
		a[i] = len(s) - 2
	}
	for i := 0; i < 4; i++ {
		b1 = true
		b2 = true
		for j := 0; j < 4; j++ {
			if j != i {
				if 2*a[i] > a[j] {
					b1 = false
				}
				if a[i] < 2*a[j] {
					b2 = false
				}
			}
		}
		if b1 || b2 {
			tmp++
			k = i
		}
	}
	if tmp == 1 {
		m := 65 + k
		fmt.Fprintln(out, string(m))
	} else {
		fmt.Println('C')
	}
	out.Flush()
}


package main

import "fmt"

func main() {
	lens := make([]int, 4, 4)
	choice := ""
	min := 0
	max := 0
	for i := 0; i < 4; i++ {
		fmt.Scan(&choice)
		lens[i] = len(choice) - 2
		if lens[min] > lens[i] {
			min = i
		}
		if lens[max] < lens[i] {
			max = i
		}
	}

	//fmt.Println(min, max)

	ans := 2
	cnt := 0
	for i := 0; i < 4; i++ {
		if lens[i] >= 2*lens[min] {
			cnt++
		}
	}
	//fmt.Println(cnt)
	if cnt == 3 {
		ans = min
	} else {
		cnt = 0
		for i := 0; i < 4; i++ {
			if lens[i] <= lens[max]/2 {
				cnt++
			}
		}

		//fmt.Println(cnt)
		if cnt == 3 {
			ans = max
		}
	}

	fmt.Println(string(ans + 'A'))
}


// 437A-mic_rizal
package main

import (
    "fmt"
)

func solve(A, B, C, D string) string {
    a := len(A) - 2
    b := len(B) - 2
    c := len(C) - 2
    d := len(D) - 2
    var an string
    if (2*a <= b && 2*a <= c && 2*a <= d) || (a >= 2*b && a >= 2*c && a >= 2*d) {
        an = string(A[0])
    }
    return an
}

func main() {
    var a, b, c, d string
    fmt.Scan(&a, &b, &c, &d)
    if solve(a, b, c, d) != "" {
        fmt.Println(solve(a, b, c, d))
    } else if solve(b, a, c, d) != "" {
        fmt.Println(solve(b, a, c, d))
    } else if solve(c, a, b, d) != "" {
        fmt.Println(solve(c, a, b, d))
    } else if solve(d, a, b, c) != "" {
        fmt.Println(solve(d, a, b, c))
    } else {
        fmt.Println("C")
    }

}


package main

import ("fmt";"sort")

type set map[int]bool

func main(){
	a := make([]string, 4)
	for i := 0; i < 4; i++{
		scan(&a[i])
	}
	sort.Slice(a, func (i, j int)bool{return len(a[i]) < len(a[j])})
	if (len(a[0]) - 2) * 2 <= len(a[1]) - 2{
		sout(string(a[0][0]))
	}else if (len(a[2]) - 2) * 2 <= len(a[3]) - 2{
		sout(string(a[3][0]))
	}else{
		sout("C")
	}
}

func scan(in ... interface{}){
	for _,k := range in{
		fmt.Scan(k)
	}
}

func sout(obj ... interface{}){
	for _, k := range obj{
		fmt.Print(k)
	}
	//fmt.Println()
}


package main

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

func main() {
	sc := NewScanner()
	N, k := sc.NextInt(), sc.NextInt()
	if k % 2 == 1 {
		fmt.Println(1)
		return
	}
	if (k / 2) % 2 == 1 {
		fmt.Println(2)
		return
	}
	n := pow(2, N)
	c := n / 2

	if c == k {
		fmt.Println(N)
		return
	}
	if k > c {
		k = n - k
	}

	fmt.Println(k / 4 + 1)
}
//aのb乗をします
func pow(a int, b int) int {
	total := 1
	tmp := a
	for b > 0 {
		if b % 2 == 1 {
			total *= tmp
		}
		b /= 2
		tmp *= tmp
	}
	return total
}

type Scanner struct {
	r   *bufio.Reader
	buf []byte
	p   int
}

func NewScanner() *Scanner {
	rdr := bufio.NewReaderSize(os.Stdin, 1000)
	return &Scanner{r:rdr}
}
func (s *Scanner) Next() string {
	s.pre()
	start := s.p
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			break
		}
	}
	result := string(s.buf[start:s.p])
	s.p++
	return result
}
func (s *Scanner) NextLine() string {
	s.pre()
	start := s.p
	s.p = len(s.buf)
	return string(s.buf[start:])
}
func (s *Scanner) NextInt() int {
	v, _ := strconv.Atoi(s.Next())
	return v
}
func (s *Scanner) NextInt64() int64 {
	v, _ := strconv.ParseInt(s.Next(), 10, 64)
	return v
}

func (s *Scanner) NextIntArray() []int {
	s.pre()
	start := s.p
	result := []int{}
	for ; s.p < len(s.buf) + 1; s.p++ {
		if s.p == len(s.buf) || s.buf[s.p] == ' ' {
			v, _ := strconv.ParseInt(string(s.buf[start:s.p]), 10, 0)
			result = append(result, int(v))
			start = s.p + 1
		}
	}

	return result
}
func (s *Scanner) NextInt64Array() []int64 {
	s.pre()
	start := s.p
	result := []int64{}
	for ; s.p < len(s.buf) + 1; s.p++ {
		if s.p == len(s.buf) || s.buf[s.p] == ' ' {
			v, _ := strconv.ParseInt(string(s.buf[start:s.p]), 10, 64)
			result = append(result, v)
			start = s.p + 1
		}
	}
	return result
}

func (s *Scanner) NextMap() map[int]bool {
	s.pre()
	start := s.p
	mp := map[int]bool{}
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			v, _ := strconv.Atoi(string(s.buf[start:s.p]))
			mp[v] = true
			start = s.p + 1
		}
	}
	v, _ := strconv.Atoi(string(s.buf[start:s.p]))
	mp[v] = true

	return mp
}

func (s *Scanner) pre() {
	if s.p >= len(s.buf) {
		s.readLine()
		s.p = 0
	}
}
func (s *Scanner) readLine() {
	s.buf = make([]byte, 0)
	for {
		l, p, e := s.r.ReadLine()
		if e != nil {
			panic(e)
		}
		s.buf = append(s.buf, l...)
		if !p {
			break
		}
	}
}


package main

import (
	"fmt"
)

func cnt(x, y int) (result int) {
	for i := x; i < x+y; i++ {
		result += 2*i + 1
	}

	return result
}

func main() {
	var a [6]int
	for i := 0; i < 6; i++ {
		fmt.Scan(&a[i])
	}
	fmt.Println(cnt(a[1], a[0]) + cnt(a[4], a[3]))
}


// Author: sighduck
// URL: https://codeforces.com/problemset/problem/559/A

package main

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

func s(x int) int {
	return x * x
}

func Solve(a1, a2, a3, a4, a5, a6 int) int {
	fmt.Println(a1, a2, a3, a4, a5, a6)
	return s(a1+a2+a3) - s(a1) - s(a3) - s(a5)
}

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

	var a1, a2, a3, a4, a5, a6 int
	fmt.Fscanf(reader, "%d %d %d %d %d %d\n", &a1, &a2, &a3, &a4, &a5, &a6)

	fmt.Fprintf(writer, "%d\n", Solve(a1, a2, a3, a4, a5, a6))
}


package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	word := scanner.Bytes()
	scanner.Scan()
	translated := scanner.Bytes()
	length := len(word)
	for index := range word {
		if word[index] != translated[length - 1 - index] {
			fmt.Println("NO")
			return
		}
	}
	fmt.Println("YES")
}


package main

import (
	"fmt"
	"os"
)

func main() {

	var a, b string

	fmt.Scan(&a, &b)

	for i := 0; i < len(a); i++ {
		if a[i] != b[len(a)-1-i] {
			fmt.Println("NO")
			os.Exit(0)
		}
	}
	fmt.Println("YES")
	os.Exit(0)
}


package main

import "fmt"

func reverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
	  runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
  }

func main(){
	var x, y string

	fmt.Scanf("%s\n%s", &x, &y)

	c := reverse(x)

	if c == y {
		fmt.Println("YES")
	}else{
		fmt.Println("NO")
	}


package main

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

var s, t string

func main() {
	stdin := os.Stdin
	// stdin, _ = os.Open("1.in")
	reader := bufio.NewReaderSize(stdin, 1<<20)
	fmt.Fscanf(reader, "%s\n%s\n", &s, &t)

	for i := 0; i < len(s); i++ {
		if s[i] != t[len(s)-i-1] {
			fmt.Println("NO")
			return
		}
	}
	fmt.Println("YES")
}


package main

import (
	"fmt"
)

func isPalindrome(a1, a2 string) bool {
	var i, n int
	n = len(a1)
	for i = 0; i < n; i++ {
		if a1[i] != a2[n-i-1] {
			return false
		}
	}
	return true
}

func main() {
	var s1, s2 string
	fmt.Scan(&s1, &s2)
	if isPalindrome(s1, s2) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

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

// no encoding
func reverseBytes(s string) string {
    r := make([]byte, len(s))
    for i := 0; i < len(s); i++ {
        r[i] = s[len(s)-1-i]
    }
    return string(r)
}

// reverseCodePoints interprets its argument as UTF-8 and ignores bytes
// that do not form valid UTF-8.  return value is UTF-8.
func reverseCodePoints(s string) string {
    r := make([]rune, len(s))
    start := len(s)
    for _, c := range s {
        // quietly skip invalid UTF-8
        if c != utf8.RuneError {
            start--
            r[start] = c
        }
    }
    return string(r[start:])
}

// reversePreservingCombiningCharacters interprets its argument as UTF-8
// and ignores bytes that do not form valid UTF-8.  return value is UTF-8.
func reversePreservingCombiningCharacters(s string) string {
    if s == "" {
        return ""
    }
    p := []rune(s)
    r := make([]rune, len(p))
    start := len(r)
    for i := 0; i < len(p); {
        // quietly skip invalid UTF-8
        if p[i] == utf8.RuneError {
            i++
            continue
        }
        j := i + 1
        for j < len(p) && (unicode.Is(unicode.Mn, p[j]) ||
            unicode.Is(unicode.Me, p[j]) || unicode.Is(unicode.Mc, p[j])) {
            j++
        }
        for k := j - 1; k >= i; k-- {
            start--
            r[start] = p[k]
        }
        i = j
    }
    return (string(r[start:]))
}

func main() {
    fmt.Scanln(s)
    fmt.Scanln(r)
    if r = reverseCodePoints(s){
       fmt.Println("YES")
    }
    else {fmt.Println("NO")
}


package main
import "fmt"
func main() {
	var a,b string
	fmt.Scanln(&a)
	fmt.Scanln(&b)
	var f,l int = 0,len(b)
	for i := range b {
		if(b[i]!=a[l-i-1]){
			f=1
		}
	}
	if f == 0{
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


// 41A-Mic
package main

import (
	"fmt"
)

func main() {
	var str string
	var reverse string
	i := 0
	benar := false
	fmt.Scan(&str)
	k := len(str) - 1
	fmt.Scan(&reverse)
	for i < len(str) {
		if str[i] == reverse[k] {
			benar = true
			k--
			i++
		} else {
			benar = false
			break
		}
	}
	if benar {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import "fmt"

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

	for i := 0; i < n; i += i + 1 {
		fmt.Print(string(s[i]))
	}
	fmt.Println()
}


package main

import (
	"fmt"
	)

func main() {
	var cipherLength int
	var cipherCode string

	fmt.Scan(&cipherLength)
	fmt.Scan(&cipherCode)

	for i:=0; i<cipherLength ; i = i + (i+1) {
		fmt.Printf("%s", string(cipherCode[i]))
	}

}


package main

import (

)

func main() {
    arr := []int{1,5,10,20,100}
    var num int

    fmt.Scan(&num)
    count := 0
    startIndex := 4
    for num > 0 {
        if num < arr[startIndex] {
            startIndex--
            continue
        }
        count += num / arr[startIndex]
        num = num % arr[startIndex]
        startIndex--
    }

    fmt.Println(num)
}


package main
import (
 "fmt"
)
func main() {
  var n,k int
  fmt.Scan(&n)
  for _,i := range([]int{100,20,10,5,1}){
    k += n/i
    n %= i
  }
  fmt.Println(k)


/*
URL:
https://codeforces.com/problemset/problem/678/D
*/

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 (
	a, b, x, n int64
)

func main() {
	a, b, n, x = ReadInt64_4()

	A := [][]int64{
		[]int64{a + 1, -a},
		[]int64{1, 0},
	}
	// A := [][]int64{
	// 	[]int64{a + 1, NegativeMod(-a, MOD)},
	// 	[]int64{1, 0},
	// }

	AK := powMat(A, n-1, MOD)

	ans := int64(0)

	big := (a*x + b) % MOD
	big *= AK[0][0]
	ans += big
	ans %= MOD

	sml := AK[0][1]
	sml *= x
	sml %= MOD
	ans += sml
	ans %= MOD

	fmt.Println(ans)
}

// NegativeMod can calculate a right residual whether value is positive or negative.
func NegativeMod(val, m int64) int64 {
	res := val % m
	if res < 0 {
		res += m
	}
	return res
}

// n*nのint型正方行列を生成する
func newMat(n int64) [][]int64 {
	var i int64

	A := make([][]int64, n)
	for i = 0; i < n; i++ {
		A[i] = make([]int64, n)
	}

	return A
}

// 行列A, Bに関するA*Bの計算
func mul(A, B [][]int64, mod int64) [][]int64 {
	var i, j, k int64
	var lenA, lenB, lenB0 int64
	lenA = int64(len(A))
	lenB = int64(len(B))
	lenB0 = int64(len(B[0]))

	C := make([][]int64, lenA)
	for i = 0; i < lenA; i++ {
		C[i] = make([]int64, lenB0)
	}

	for i = 0; i < lenA; i++ {
		for k = 0; k < lenB; k++ {
			for j = 0; j < lenB0; j++ {
				C[i][j] = (C[i][j] + A[i][k]*B[k][j]) % mod
			}
		}
	}

	return C
}

// 行列Aに関するA^nの計算
func powMat(A [][]int64, n, mod int64) [][]int64 {
	var i int64
	var lenA int64
	lenA = int64(len(A))

	B := make([][]int64, lenA)
	for i = 0; i < lenA; i++ {
		B[i] = make([]int64, lenA)
	}

	for i = 0; i < lenA; i++ {
		B[i][i] = 1
	}
	for n > 0 {
		if n&1 == 1 {
			B = mul(B, A, mod)
		}
		A = mul(A, A, mod)
		n = (n >> 1)
	}

	return B
}

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

/*********** 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...)
}


//
// Created by aldair on 21/10/20.
// https://codeforces.com/problemset/problem/236/A
//

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() {
	defer writer.Flush()

	var username string
	scanf("%s\n", &username)

	if len(username)%2 == 0 {
		printf("CHAT WITH HER!\n")
	} else {
		printf("IGNORE HIM!\n")
	}
}


package main

import (
	"fmt"

	"github.com/emirpasic/gods/sets/hashset"
)

func main() {
	var s string
	fmt.Scan(&s)
	st := hashset.New()
	for i := range s {
		st.Add(s[i])
	}
	if st.Size()%2 == 0 {
		fmt.Print("CHAT WITH HER!")
	} else {
		fmt.Print("IGNORE HIM!")
	}

}


package main

import "fmt"

func main() {
	chars := map[rune]bool{}
	var word string
	fmt.Scanf("%s\n", &word)
	for _, c := range word {
		chars[c] = true
	}

	if len(chars)%2 == 0 {
		fmt.Println("CHAR WITH HER!")
	} else {
		fmt.Println("IGNORE HIM!")
	}
}


package main

import "fmt"

// A. Boy or Girl
// time limit per test
// 1 second
// memory limit per test
// 256 megabytes
// input
// standard input
// output
// standard output

// Those days, many boys use beautiful girls' photos as avatars in forums. So it is pretty hard to tell the gender of a user at the first glance. Last year, our hero went to a forum and had a nice chat with a beauty (he thought so). After that they talked very often and eventually they became a couple in the network.

// But yesterday, he came to see "her" in the real world and found out "she" is actually a very strong man! Our hero is very sad and he is too tired to love again now. So he came up with a way to recognize users' genders by their user names.

// This is his method: if the number of distinct characters in one's user name is odd, then he is a male, otherwise she is a female. You are given the string that denotes the user name, please help our hero to determine the gender of this user by his method.
// Input

// The first line contains a non-empty string, that contains only lowercase English letters — the user name. This string contains at most 100 letters.
// Output

// If it is a female by our hero's method, print "CHAT WITH HER!" (without the quotes), otherwise, print "IGNORE HIM!" (without the quotes).

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

	// since our input is constrained to lowercase ascii characters, this is a better way to count the chars compared to using a map
	var charCounts [26]int

	for _, r := range input {
		c := byte(r)
		charCounts[c-'a']++
	}

	var nDistinctChars int
	for _, count := range charCounts {
		if count == 1 {
			nDistinctChars++
		}
	}

	if nDistinctChars%2 == 0 {
		fmt.Print("CHAT WITH HER!")
	} else {
		fmt.Print("IGNORE HIM!")
	}
}


package main

import "fmt"

func judui(c int) int {
	if c < 0 {
		c = c * (-1)
	}
	return c
}

func main() {
	var a, b int
	x := 0
	y := 0
	z := 0
	fmt.Scanln(&a, &b)
	for i := 1; i < 7; i++ {
		if judui(i-a) == judui(i-b) {
			y++
		} else if judui(i-a) > judui(i-b) {
			x++
		} else {
			z++
		}
	}
	fmt.Printf("%d %d %d", x, y, z)
}


// 378A
package main

import (
	"fmt"
	"math"
)

func main() {
    var a, b, wina, winb, draw int
    fmt.Scan(&a, &b)
    for x := 1; x <= 6; x++ {
		ai := float64(x)-a
		bi := float64(x)-b
        if math.Abs(ai) < math.Abs(bi) {
            wina++
        } else if math.Abs(ai) > math.Abs(bi) {
            winb++
        } else {
            draw++
        }
    }
    fmt.Println(wina, draw, winb)
}


// 104A-mic
package main

import (
    "fmt"
)

func main() {
    var n int
    fmt.Scan(&n)
    if n == 20 {
        fmt.Println("15")
    }else if n == 10 || n>21 {
        fmt.Println("0")
    } else {
        fmt.Println("4")
    }
}


package main

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

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 main() {
	if f, err := os.Open("in.txt"); err == nil {
		r = bufio.NewReader(f)
	} else {
		r = bufio.NewReader(os.Stdin)
	}
	w = bufio.NewWriter(os.Stdout)
	defer w.Flush()
	var id string
	for I(&id, "\n") == nil {
		if solve(id) {
			O("YES", "\n")
		} else {
			O("NO", "\n")
		}
	}
}
func solve(id string) bool {
	pattern := "^[a-zA-Z0-9_]{2,15}@([a-zA-Z0-9_]{2,15}\\.?)*(\\/[a-zA-Z0-9_]{2,15})?$"
	if regexp.MustCompile(pattern).MatchString(id) {
		o := strings.Split(id, "@")
		if strings.Contains(o[1], "/") {
			o = append([]string{o[0]}, strings.Split(o[1], "/")...)
		}
		if len(o[1]) > 1 && len(o[1]) < 32 && o[1][len(o[1])-1] != '.' {
			return true
		}
	}
	return false
}


package main

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

var re *regexp.Regexp = regexp.MustCompile("^[0-9a-zA-Z_]{1,16}$")

func main() {
	bs, _ := ioutil.ReadAll(os.Stdin)
	reader := bytes.NewBuffer(bs)

	var s string
	fmt.Fscanf(reader, "%s", &s)

	segs := strings.Split(s, "@")
	if len(segs) != 2 || !re.Match([]byte(segs[0])) {
		fmt.Printf("NO")
		return
	}
	segs = strings.Split(segs[1], "/")
	if len(segs) > 2 {
		fmt.Printf("NO")
		return
	} else {
		if len(segs[0]) < 1 || len(segs[0]) > 32 {
			fmt.Printf("NO")
			return
		}
		hostnameSegs := strings.Split(segs[0], ".")
		for i := 0;i < len(hostnameSegs);i ++ {
			if !re.Match([]byte(hostnameSegs[0])) {
				fmt.Printf("NO")
				return
			}
		}
		if len(segs) == 2 && !re.Match([]byte(segs[1])) {
			fmt.Printf("NO")
			return
		}
	}
	fmt.Printf("YES")
	return
}


package main

import "os"
import "bufio"
import "fmt"
import "strings"

func main() {
	scanner := bufio.NewScanner(os.Stdin);
	for scanner.Scan() {
		if do_str(scanner.Text()) {
			fmt.Println("YES");
		} else {
			fmt.Println("NO");
		}
	}

}

func isalpha(c rune) bool {
	if c >= 'a' && c <= 'z' {
		return true;
	}
	if c >= 'A' && c <= 'Z' {
		return true;
	}
	return false;
}

func isdigit(c rune) bool {
	if c >= '0' && c <= '9' {
		return true;
	}
	return false;
}

func do_str(s string) bool {
	idx := strings.Index(s, "@");
	if idx == -1 {
		// No "@"
		return false;
	}

	username := s[0:idx];
	if len(username) > 16 || len(username) < 1 {
		return false;
	}

	for _, c := range(username) {
		if isalpha(c) { continue }
		if isdigit(c) { continue }
		if c == '_' { continue }
		return false
	}

	if len(s[idx:]) == 1 {
		return false;
	}
	var resource string;
	var hostname string;

	rest := s[idx+1:]
	idx = strings.Index(rest, "/");
	if idx == -1 {
		resource = "";
		hostname = rest;
	} else {
		resource = rest[idx:];
		if len(resource) == 1 {
			return false;
		}
		resource = resource[idx+1:]
		hostname = rest[0:idx];
	}

	if len(hostname) < 1 || len(hostname) > 32 {
		return false
	}
	for _, c := range(hostname) {
		if isalpha(c) { continue }
		if isdigit(c) { continue }
		if c == '_' { continue }
		if c == '.' { continue }
		return false
	}
	words := strings.Split(hostname, ".");
	for _, word := range(words) {
		if len(word) < 1 || len(word) > 16 {
			return false;
		}
	}
	if len(resource) > 16 {
		return false;
	}
	for _, c := range(resource) {
		if isalpha(c) { continue }
		if isdigit(c) { continue }
		if c == '_' { continue }
		return false
	}

	return true
}


package main

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

var in = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	defer out.Flush()
	in.Split(bufio.ScanWords)

	a, b ,c := nextInt(), nextInt(), nextInt()

	var lo, hi int64 = 0, 1000000000
	var m, x, rem int64
	var bad bool
	for hi - lo > 1 {

		m = lo + (hi - lo) / 2
		x = b * m
		rem = a * c - x
		bad = false

		for rem > 0 {
			x += b
			x -= a
			if x < 0 {
				bad = true
				break
			}
			rem -= b
		}

		if bad {
			lo = m
		}else {
			hi = m
		}
	}

	fmt.Println(hi)
}

func next() string {
	if !in.Scan() {
		panic("Scan error")
	}

	return in.Text()
}

func nextInt() int {
	ret, _ := strconv.Atoi(next())
	return ret
}


// 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"
)

var k int
func main() {
  fmt.Scan(&k)
  s := "codeforce"
  var s2 string
  for i := 0; i < k; i++ {
    s2 += "s"
  }
  fmt.Println(s+s2)
}


package main

import (
	. "fmt"
	. "strings"
)

// github.com/EndlessCheng/codeforces-go
func main() {
	var k, n int64 = 0, 3
	Scan(&k)
	for ; n/3*(n+1)/3*(n+2)/3 < k; n++ {}
	m := int(n)
	Println(Repeat("c", (m+2)/3) + Repeat("o", (m+1)/3) + "d" + Repeat("e", m/3) + "forces")
}


package main

import (
    "fmt"
    )

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

    ans := 0
    for a := 0; a <= m; a++ {
        b := n - a*a
        if a + b*b == m {
            ans++
        }
    }

    fmt.Println(ans)
}


// System of Equations
package main

import (
	"fmt"
)

func Maxx (n,m int)int{
	if n>m{
		return n
	}else{
		return m
	}
}

func main() {
	var n, m, cnt, l int
	fmt.Scan(&n, &m)
	l=Maxx(n,m)
	for i := 0; i < l; i++ {
		for j := 0; j < l; j++ {
			if i*i+j == n && j*j+i == m {
				cnt++
			}
		}
	}
	fmt.Print(cnt)
}


package main
import "fmt"

const INF int64 = 2147483647
const MAX int64 = 1e7
const MOD int64 = 1e7+9
var isgood [MAX]bool
func Max(a, b int64) int64 {
	if (a < b) {
		return b
	}
	return a
}
func Init(a, b, n int64) {
	var k int64
	for k = 0; k < MAX; k++ { isgood[k] = true }
	for k = 1; k <= Max(a,b) * n; k++ {
		p := k
		for p > 0 {
			if p % 10 != a && p % 10 != b {
				isgood[k] = false
				break
			}
			p /= 10
		}
	}
}

func EE(a, b int64) int64 {
	var (
		r=a%b
		x0 int64=1
		y0 int64=0
		x1 int64=0
		y1 int64=1
		mod=b
	)
	for r > 0 {
		f:=a/b
		tx:=x0-f*x1
		ty:=y0-f*y1
		x0=x1
		y0=y1
		x1=tx
		y1=ty
		a=b
		b=r
		r=a%b
	}
	return (x1%mod+mod)%mod
}

func main() {
	var a,b,n int64
	fmt.Scanf("%d%d%d",&a,&b,&n)
	Init(a,b,n)
	var (
		choose int64=1
		x int64=0
		y int64
	)
	cnt := make(map[int64]int64)
	for x <= n {
		y=n-x
		s:=a*x+b*y
		if isgood[s] { cnt[s]=(cnt[s]+choose)%MOD }
		choose=((choose*(n-x))%MOD)*EE(x+1,MOD)%MOD
		x++
	}
	var ans int64 = 0
	for k,v := range cnt {
		if isgood[k] { ans = (ans + v) % MOD }
	}
	fmt.Println(ans)
}


	package main

	import "fmt"

	func main()  {
		var input string
		var count,trans int
		//fmt.Println("enter the value of input:")
		fmt.Scanln(&input)
		len:=len(input)
		for i := 0; i < len; i++ {
			if i==0 {
				continue
			}
			if count>=7 {
				fmt.Println("YES")
				return
			}
			if input[i]==input[i-1] {
				count++
			}
		}

			fmt.Println("NO")

	}


package main

import (
	"bufio"
	"os"
)

type input struct {
	a string
}

func (s *input) readIn(scanner *bufio.Scanner) {
	for scanner.Scan() {
		s.a = scanner.Text()
	}
}
}

func main() {
	sc := bufio.NewScanner(os.Stdin)
	var inp input
	inp.readIn(sc)
	chr := ""
	var v1 int
	for _, b := range inp.a {
		str := string(b)
		if str == chr {
			v1++
		} else {
			v1 = 1
		}

	}

}


package main

import (
	"bufio"
	"os"
)

func main() {
	reader := bufio.NewReader(os.Stdin)
	for {
		sequence, _ := reader.ReadString('\n')
		if(check(sequence)) {
			println("YES")
		} else {
			println("NO")
		}
	}
}

func check(sequence string) bool {
	counter := 1
	for i := 1; i < len(sequence); i++ {
		if(sequence[i]==sequence[i-1]) {
			counter += 1
			if(counter==7) {
				return true
			}
		} else {
			counter = 1
		}
	}
	return false
}


package main

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

func main() {
	var a1, a2, a3, b1, b2, b3, n uint16
	in := bufio.NewReader(os.Stdin)
	fmt.Fscanf(in, "%d %d %d\n", &a1, &a2, &a3)
	fmt.Fscanf(in, "%d %d %d\n", &b1, &b2, &b3)
	fmt.Fscanf(in, "%d\n", &n)
	if a1+a2+a3 < 5 {
		if a1+a2+a3 != 0 {
			n--
		}
	} else {
		n -= (a1 + a2 + a3) / 5
	}
	if b1+b2+b3 < 10 {
		if b1+b2+b3 != 0 {
			n--
		}
	} else {
		n -= (b1 + b2 + b3) / 10
	}
	if n > 255 {
		fmt.Println("NO")
	} else {
		fmt.Println("YES")
	}
}


package main

import "fmt"

func main() {
  var a1, a2, a3, b1, b2, b3, n int
  fmt.Scan(&a1, &a2, &a3, &b1, &b2, &b3, &n)
  a := a1 + a2 + a3
  b := b1 + b2 + b3
  a = int(a / 10)
  if (a1 + a2 + a3) % 10 != 0 {
    a++
  }
  b = int(b / 10)
  if (b1 + b2 + b3) % 10 != 0 {
    b++
  }
  if n >= a + b {
    fmt.Println("YES")
  } else {
    fmt.Println("NO")
  }
}


package main

import (
	"fmt"
	"math"
)

func main() {
	var a1, a2, a3, b1, b2, b3, p int
	fmt.Scan(&a1, &a2, &a3, &b1, &b2, &b3, p)
	a := math.Ceil((float64)(a1+a2+a3) / 5.0)
	b := math.Ceil((float64)(b1+b2+b3) / 10.0)
	if ((float64)(p)-a-b) >= 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main
import (
	"fmt"
)
func main() {
	var n int
	fmt.Scan(&n)
	e:=make([]int,3)
	t :=0
	for k:=0;k<n;k++ {
		fmt.Scan(&t)
		e[k&3]+=t
	}
	if e[0] > e[1] && e[0] > e[2] {
		fmt.Println("chest")
	} else if e[1] > e[2] {
		fmt.Println("biceps")
	} else {fmt.Println("back")}

}