package main

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

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

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

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

func nextInt() int {
	v, _ := strconv.Atoi(nextToken())
	return v
}

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

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

func printInt(x int) {
	writer.WriteString(strconv.Itoa(x))
}

var n int32
var s string
var a [500][500]int

func main() {
	n = nextInt()
	s = nextToken()
	x, y := 250, 250
	a[x][y] = 1
	ans := 0
	for _, c := range s {
		switch c {
		case 'U':
			y++
		case 'D':
			y--
		case 'L':
			x--
		case 'R':
			x++
		}
		ans += a[x][y]
		a[x][y]++
	}
	printInt(ans)
	writer.Flush()
}


package main

import "fmt"

func main() {
	var weight,modulo int
	var flag  bool
	fmt.Scanf("%d", &weight)
	if weight > 0 && weight < 101 {
		for loop := 2; loop < 101 ; loop=loop+2 {
			modulo = weight  - loop
			if modulo < 0 { break }
			if modulo % 2 == 0 {
				flag = true
			}else{
				flag = false
			}
		}
	}
	if flag {
		fmt.Println("YES")
	}else{
		fmt.Println("NO")
	}
}


package main

import "fmt"

func main() {
	var weight int
	fmt.Scanf("%d", &weight)
	if weight > 2 {
		if (weight % 2 == 0 ) {
			fmt.Println("YES")
		}
	} else {
		fmt.Println("NO")
	}
}


package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	ws, _ := reader.ReadString('\n')
	w, _ := strconv.Atoi(strings.Trim(ws, "\n"))
	fmt.Printf("%d\n", w)
	if w <= 2 {
		fmt.Println("NO")
	} else if w%2 != 0 {
		fmt.Println("NO")
	} else {
		fmt.Println("YES")
	}
}


package main

import "fmt"

func main() {
	number := -1
	_, err := fmt.Scanln(&number)
	if err != nil {
		panic(err)
	}
	if (number % 2) == 0 {
		fmt.Print("YES")
	} else {
		fmt.Print("NO")
	}
}


package main

import "fmt"

func main() {
 var x int
  fmt.Scanf("%d",&x)
  if(x/2 == 0 && x > 2){
    fmt.Print("YES\n")
  }else{
    fmt.Print("NO\n")
  }
}


package main

import (
	"fmt"
)

func main()  {
	var i int
	_, _ = fmt.Scanf("%d", &i)
	if (i-2) > 0 && (i - 2) % 2 != 0{
		fmt.Println("NO")
	} else {
		fmt.Println("YES")
	}

}


package main

import (
	"fmt"
)

func main() {
	var a int
	fmt.Scanf("%d", a)
	if a>2 && a%2 == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

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

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

	w, err := strconv.Atoi(strings.Trim(text, "\r\n"))
	if err != nil {
		fmt.Println(err)
		return
	}
	if w%2 == 0 {
		fmt.Println("YES")
		return
	}
	fmt.Println("NO")
}


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() {
	// The weight of watermelon
	var w int
	scanf("%d\n", &w)

	var b bool = false
	if w <= 2 {
		printf("NO\n")
	} else if w%2 == 0 {
		printf("YES\n")
	} else {
		printf("NO\n")
	}

	writer.Flush()
}


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() {
	// Watermelon weight
	var w int
	scanf("%d\n", &w)

	// Display results
	if w > 2 && w%2 == 0 {
		printf("YES\n")
	} else if w%2 == 0 {
		printf("NO\n")
	}

	writer.Flush()
}


package main

import "fmt"

func main() {
	var w,a int
	fmt.Scan(&w)
	if (w%2)==0{
			fmt.Print("YES")
			}
		else{
			fmt.Print("NO")
			}
	}


package main

import "fmt"

func main() {
	var w int
	fmt.Scan(&w)
	if (w%2)==0 && w>1{
		fmt.Print("YES")
	}else{
		fmt.Print("NO")
	}
}


package main

import "fmt"

func main() {
	var n int
	fmt.Scanf("%d\n")
	if n % 2 == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import "fmt"

func main() {
	var n int
	fmt.Scanf("%d\n")
	fmt.Printf("%s\n", n % 2 == 0 ? "YES" : "NO")
}


package main

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

func main() {

var WKgVar uint
var OstatokDelVar uint = 0;
var Zero uint = 0;
// var Kolvo2KgVar int = 1;
// var ObshKgVar int = 1;

// Ввод числа Килограмм.
fmt.Scan(&WKgVar)
// Четность, нечетность.
OstatokDelVar = WKgVar%4;
if WKgVar <= 100{
if OstatokDelVar == Zero{
	// fmt.Println("Остаток от деления равен ноль")
	if WKgVar >= 4{
		//fmt.Println("WkgVar >= 4")
		fmt.Println("YES");
		}

}
} else {fmt.Println("NO");
	}

}


Copy
package main

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

func main() {
    r := bufio.NewReader(os.Stdin)
	s, _ := r.ReadString('\n')
	n, _ := strconv.Atoi(s)
	if n %2 == 0 {
	    fmt.Println("YES")
	    return
	}
	fmt.Prinln("NO")
}


package main

import (
	"fmt"
	"os"
)

func main() {
	var n int
	fmt.Fscanf(os.Stdin, "%d\n", &n)
	if n%2 == 0 {
		fmt.Println("YES")
		return
	}
	fmt.Println("NO")
}


package main

import "fmt"

func main() {
    var w uint

    fmt.Scanf("%d", &w)

    if (w % 2 == 0) {
        fmt.Println("YES")
    } else {
        fmt.Println("NO")
    }
}


package main

import "fmt"

func main() {
    var w uint

    fmt.Scanf("%d", &w)

    if (w == 2) {
        fmt.Println("NO")
    if (w % 2 == 0) {
        fmt.Println("YES")
    } else {
        fmt.Println("NO")
    }
}


package main

import "fmt"

func main() {
  for {
    var i int
    _, err := fmt.Scanf("%d", &i)
    if err != nil {fmt.Println(err)}
    if i%2 == 0 {
        fmt.Println("Yes")
    }else{
        fmt.Println("No")
    }
  }
}


package main

import "fmt"

func main() {
//   for {
    var i int
    _, err := fmt.Scanf("%d", &i)
    if err != nil {fmt.Println(err)}
    if (i%2 == 0) && (i<100) && (i>2) {
        fmt.Println("Yes")
    }else{
        fmt.Println("No")
    }
//   }
}


package main

import (
	"fmt"
)

func main() {
	var input int64
	fmt.Scanln(&input)
    input -= 2
    if input % 2 == 0 {
        fmt.Println("YES")
    } else {
        fmt.Println("NO")
    }
}


package main

import (
  "fmt"
  "strconv"
)

func main(){
  var text string
  fmt.Scanf("%v\n", &text)
  i, _ := strconv.Atoi(text)
  if (i%2==0 i>2) {
    fmt.Println("YES")
    return
  }
  fmt.Println("NO")
}


package main

import (
  "fmt"
  "strconv"
)

func main(){
  var text string
  fmt.Scanf(text)
  i, _ := strconv.Atoi(text)
  if (i%2==0 && i>2) {
    fmt.Println("YES")
    return
  }
  fmt.Println("NO")
}


package main

import (
  "fmt"
  "strconv"
)

func main(){
  var i int
  fmt.Scanf("%d\n", &i)
  //i, _ := strconv.Atoi(text)
  if (i%2==0 && i>2) {
    fmt.Println("YES")
    return
  }
  fmt.Println("NO")
}


package main

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

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

type V struct {
	P, Pchar, Link int
	Next, Walk [26]int
}

func (node V) String() string {
	return fmt.Sprintf("p = %v, pchar = %v, link = %v", node.P, node.Pchar, node.Link)
}

func CreateNode(p, pchar int) *V {
	v := &V{P:p, Pchar:pchar, Link:-1}
	for i := 0; i < len(v.Next); i++ {
		v.Next[i], v.Walk[i] = -1, -1
	}
	return v
}

func AddString(a string) {
	var v int = 0
	for i := 0; i < len(a); i++ {
		var c int = int(a[i] - 'A')
		if tree[v].Next[c] == -1 {
			tree[size] = CreateNode(v, c)
			tree[v].Next[c] = size
			size++
		}
		v = tree[v].Next[c]
	}
}

func Walk(v, c int) int {
	if tree[v].Walk[c] != -1 {
		return tree[v].Walk[c]
	}
	if tree[v].Next[c] != -1 {
		tree[v].Walk[c] = tree[v].Next[c]
	}else {
		if v == 0 {
			tree[v].Walk[c] = 0
		}else {
			tree[v].Walk[c] = Walk(Getlink(v), c)
		}
	}
	return tree[v].Walk[c]
}

func Getlink(v int) int {
	if tree[v].Link != -1 {
		return tree[v].Link
	}
	if v == 0 || tree[v].P == 0 {
		tree[v].Link = 0
	}else {
		tree[v].Link = Walk(Getlink(tree[v].P), tree[v].Pchar)
	}
	return tree[v].Link
}

func Dp(i, j, k int) int {
	if k == v {
		return -oo
	}
	if i == n {
		return 0
	}
	if j == m {
		return 0
	}

	if dp[i][j][k] != -1 {
		return dp[i][j][k]
	}

	var ret int = -oo
	if a[i] == b[j] {
		var next int = Walk(k, int(a[i] - 'A'))
		if next != v {
			ret = Max(ret, Dp(i + 1, j + 1, next) + 1)
		}
	}

	ret = Max(ret, Dp(i + 1, j, k))
	ret = Max(ret, Dp(i, j + 1, k))

	dp[i][j][k] = ret
	return ret
}

func Print(i, j, k int) {
	if i == n {
		return
	}
	if j == m {
		return
	}
	if a[i] == b[j] {
		var ret, which int = Dp(i + 1, j, k), 0
		if ret < Dp(i, j + 1, k) {
			ret, which = Dp(i, j + 1, k), 1
		}
		var next int = Walk(v, int(a[i] - 'A'))
		if next != v {
			if ret <= Dp(i + 1, j + 1, next) {
				ret, which = Dp(i + 1, j + 1, next), 2
			}
		}

		if which == 0 {
			Print(i + 1, j, k)
		}else if which == 1 {
			Print(i, j + 1, k)
		}else {
			fmt.Fprint(out, string(a[i]))
			Print(i + 1, j + 1, next)
		}

	}else {
		var ret int = Dp(i + 1, j , k)
		if ret < Dp(i, j + 1, k) {
			Print(i, j + 1, k)
		}else {
			Print(i + 1, j, k)
		}
	}
}

const oo = 1<<30

var n, m, v int
var a, b, c string
var size int
var tree [100]*V

var dp [][][]int

func main() {

	defer out.Flush()
	in.Split(bufio.ScanWords)

	a, b, c = Next(), Next(), Next()
	n, m, v = len(a), len(b), len(c)
	tree[size] = CreateNode(-1, -1)
	size++
	AddString(c)

	dp = make([][][]int, n)
	for i := 0; i < n; i++ {
		dp[i] = make([][]int, m)
		for j := 0; j < m; j++ {
			dp[i][j] = make([]int, v)
			for k := 0; k < v; k++ {
				dp[i][j][k] = -1
			}
		}
	}

	var ret int = Dp(0, 0, 0)
	// fmt.Fprintln(out, ret)
	if ret <= 0 {
		fmt.Fprintln(out, 0)
	}else {
		Print(0, 0, 0)
		fmt.Fprintln(out);
	}
}

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

func Next() string{
	if !in.Scan() {
		panic("Scan error")
	}
	return in.Text()
}

func NextInt() int{
	ret, _ := strconv.Atoi(Next())
	return ret
}


package main

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

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

type V struct {
	P, Pchar, Link int
	Next, Walk [26]int
}

func (node V) String() string {
	return fmt.Sprintf("p = %v, pchar = %v, link = %v", node.P, node.Pchar, node.Link)
}

func CreateNode(p, pchar int) *V {
	v := &V{P:p, Pchar:pchar, Link:-1}
	for i := 0; i < len(v.Next); i++ {
		v.Next[i], v.Walk[i] = -1, -1
	}
	return v
}

func AddString(a string) {
	var v int = 0
	for i := 0; i < len(a); i++ {
		var c int = int(a[i] - 'A')
		if tree[v].Next[c] == -1 {
			tree[size] = CreateNode(v, c)
			tree[v].Next[c] = size
			size++
		}
		v = tree[v].Next[c]
	}
}

func Walk(v, c int) int {
	if tree[v].Walk[c] != -1 {
		return tree[v].Walk[c]
	}
	if tree[v].Next[c] != -1 {
		tree[v].Walk[c] = tree[v].Next[c]
	}else {
		if v == 0 {
			tree[v].Walk[c] = 0
		}else {
			tree[v].Walk[c] = Walk(Getlink(v), c)
		}
	}
	return tree[v].Walk[c]
}

func Getlink(v int) int {
	if tree[v].Link != -1 {
		return tree[v].Link
	}
	if v == 0 || tree[v].P == 0 {
		tree[v].Link = 0
	}else {
		tree[v].Link = Walk(Getlink(tree[v].P), tree[v].Pchar)
	}
	return tree[v].Link
}

func Dp(i, j, k int) int {
	if k == v {
		return -oo
	}
	if i == n {
		return 0
	}
	if j == m {
		return 0
	}

	if dp[i][j][k] != -1 {
		return dp[i][j][k]
	}

	var ret int = -oo
	if a[i] == b[j] {
		var next int = Walk(k, int(a[i] - 'A'))
		if next != v {
			ret = Max(ret, Dp(i + 1, j + 1, next) + 1)
		}
	}

	ret = Max(ret, Dp(i + 1, j, k))
	ret = Max(ret, Dp(i, j + 1, k))

	dp[i][j][k] = ret
	return ret
}

func Print(i, j, k int) {
	if i == n {
		return
	}
	if j == m {
		return
	}
	if a[i] == b[j] {
		var ret, which int = Dp(i + 1, j, k), 0
		if ret < Dp(i, j + 1, k) {
			ret, which = Dp(i, j + 1, k), 1
		}
		var next int = Walk(v, int(a[i] - 'A'))
		if next != v {
			if ret <= Dp(i + 1, j + 1, next) {
				ret, which = Dp(i + 1, j + 1, next), 2
			}
		}

		if which == 0 {
			Print(i + 1, j, k)
		}else if which == 1 {
			Print(i, j + 1, k)
		}else {
			fmt.Fprint(out, string(a[i]))
			Print(i + 1, j + 1, next)
		}

	}else {
		var ret int = Dp(i + 1, j , k)
		if ret < Dp(i, j + 1, k) {
			Print(i, j + 1, k)
		}else {
			Print(i + 1, j, k)
		}
	}
}

const oo = 1<<30

var n, m, v int
var a, b, c string
var size int
var tree [110]*V

var dp [][][]int

func main() {

	defer out.Flush()
	in.Split(bufio.ScanWords)

	a, b, c = Next(), Next(), Next()
	n, m, v = len(a), len(b), len(c)
	tree[size] = CreateNode(-1, -1)
	size++
	AddString(c)

	dp = make([][][]int, n)
	for i := 0; i < n; i++ {
		dp[i] = make([][]int, m)
		for j := 0; j < m; j++ {
			dp[i][j] = make([]int, v)
			for k := 0; k < v; k++ {
				dp[i][j][k] = -1
			}
		}
	}

	var ret int = Dp(0, 0, 0)
	// fmt.Fprintln(out, ret)
	if ret <= 0 {
		fmt.Fprintln(out, 0)
	}else {
		Print(0, 0, 0)
		fmt.Fprintln(out);
	}
}

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

func Next() string{
	if !in.Scan() {
		panic("Scan error")
	}
	return in.Text()
}

func NextInt() int{
	ret, _ := strconv.Atoi(Next())
	return ret
}


// A. Vasya the Hipster
/*
One day Vasya the Hipster decided to count how many socks he had. It turned out
that he had a red socks and b blue socks.

According to the latest fashion, hipsters should wear the socks of different
colors: a red one on the left foot, a blue one on the right foot.

Every day Vasya puts on new socks in the morning and throws them away before
going to bed as he doesn't want to wash them.

Vasya wonders, what is the maximum number of days when he can dress
fashionable and wear different socks, and after that, for how many days he
can then wear the same socks until he either runs out of socks or cannot make
a single pair from the socks he's got.

Can you help him?

Input
The single line of the input contains two positive integers a and b
(1 ≤ a, b ≤ 100) — the number of red and blue socks that Vasya's got.

Output
Print two space-separated integers — the maximum number of days when Vasya can
wear different socks and the number of days when he can wear the same socks
until he either runs out of socks or cannot make a single pair from the socks
he's got.

Keep in mind that at the end of the day Vasya throws away the socks that he's
been wearing on that day.

Examples
Input
3 1

Output
1 1

Input
2 3

Output
2 0

Input
7 3

Output
3 2

Note
In the first sample Vasya can first put on one pair of different socks,
after that he has two red socks left to wear on the second day.
*/
package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	input, _ := reader.ReadString('\n')
	inputArr := strings.Split(strings.TrimSpace(input), " ")
	a, _ := strconv.Atoi(inputArr[0])
	b, _ := strconv.Atoi(inputArr[1])

	o1, o2 := 0, 0
	if a < b {
		o1 = a % b
		o2 = (b - o1) / 2
	} else {
		o1 = b % a
		o2 = (a - o1) / 2
	}
	fmt.Printf("%v %v", o1, o2)
}


package main

import "fmt"

func diff(red int,blue int) (val1 int,val2 int) {
for{
  if (red!=0)&&(blue!=0) {
	  val1++

  }else{
	 // fmt.Printf("the value of red and blue before being passed to same :%d %d\n",red,blue)
   if red>1 {
	   val2=same(red)
	   break
   }else if blue>1{
	   val2=same(blue)
	   break
   }else{
	   break
   }

}
red--;blue--;
}
return
}

func main()  {
	var red,blue int
	fmt.Scan(&red)
	fmt.Scan(&blue)
	val1,val2:=diff(red,blue)
	fmt.Print(val1,val2)
	}

func same(col int)(val2 int){

	for{

		if col>0 {
			val2++
		}else{
			return
		}
		col=col-2
	}

}


package main

import (
	"fmt"
	"sort"
)

func main() {
	var a, b int
	fmt.Scan(&a, &b)
	sp := []int{a, b}
	sort.Ints(mas)
	k := sp[0]
	k2 := (sp[1] - sp[0]) / 2
	fmt.Println(k, k2)
}


package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	var a, b, c, d uint8
	c = 0
	d = 0
	fmt.Fscanf(in, "%d %d\n", &a, &b)
	for i := b; i > 0 && a > 0; i-- {
		a--
		b--
		c++
	}
	d = a / 2
	fmt.Println(c, d)
}


package main

import "fmt"

func main() {
	var a, b int
	fmt.Scan(&a, &b)
	if a < b {
		fmt.Print(a, b/2)
	} else if b < a {
		fmt.Print(b, a/2)
	} else if b == a {
		fmt.Print(a, 0)
	}
}


package main

import "fmt"

// Retorna slice de slices com as duplas retiradas.
func possiveisJogadas(row []int, num int, x int) [][]int {
	duplas := make([][2]int, 0)

	for i := 0; i+1 <= num-1; i++ {
		if row[i] == x && row[i] == row[i+1] {
			duplas = append(duplas, [2]int{i, i + 1})
		}
	}

	possibilidades := make([][]int, len(duplas))

	for i, v := range duplas {
		copia := make([]int, num)
		copy(copia, row)
		x, y := v[0], v[1]

		possibilidades[i] = append(copia[:x], copia[y+1:]...)

	}

	return possibilidades
}

// Remove um range de um array. [x, y] != [x, y)
func removerElementos(row *[]int, x, y int) {
	*row = append((*row)[:x], (*row)[y+1:]...)
}

func limparRow(row []int) []int {
	i := 1
	grupo := 1
	grupoAchado := false
	for {
		if i >= len(row) {
			if grupo >= 3 {
				removerElementos(&row, i-grupo, i-1)
			}
			break
		}

		if row[i] == row[i-1] {
			grupo++
			if grupo >= 3 {
				grupoAchado = true
			}
		} else {
			if grupoAchado {
				removerElementos(&row, i-grupo, i-1)
				i = 0
				grupoAchado = false

			}
			grupo = 1
		}

		i++
	}

	return row
}

func main() {
	// len(row), num de cores, cor escolhida pelo player.
	var num, k, x int
	fmt.Scan(&num, &k, &x)

	// Criar slice que representa a row.
	row := make([]int, num)
	for i := 0; i < num; i++ {
		fmt.Scan(&row[i])
	}

	// Copia e algoritmos.
	jogadas := possiveisJogadas(row, num, x)
	if len(jogadas) == 0 {
		fmt.Println(0)
	}

	maior := 0
	for _, jogada := range jogadas {
		cont := num - len(limparRow(jogada))
		if cont > maior {
			maior = cont
		}
	}
	fmt.Println(maior)
}


package main

import "fmt"

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

func abs(num int) int {
    return max(num, -num)
}

func main() {
    var r1, c1, r2, c2 int
    fmt.Scan(r1, c1, r2, c2)
    var rook, bishop, king int
    if r1 == r2 || c1 == c2 {
        rook = 1
    } else {
        rook = 2
    }
    if (r1+c1)%2 != (r2+c2)%2 {
        bishop = 0
    } else if r1+c1 == r2+c2 || r1-c1 == r2-c2 {
        bishop = 1
    } else {
        bishop = 2
    }
    king = max(abs(r1-r2), abs(c1-c2))
    fmt.Println(rook, bishop, king)
}


package main

import (
	"fmt"
)

func main() {
	var w int
	fmt.Scanf("%d", &w)
	if w%2 != 0 && w == 2 {
		fmt.Println("NO")
	}else {
		fmt.Println("YES")
	}
}


package main

import (
    "fmt"
    "io"
    "strings"
    "bytes"
    "os"
)

type contestIn struct {
	reader io.Reader
}

type contestOut struct {
	writer io.Writer
}

type Contest struct {
	In contestIn
	Out contestOut
}

func NewSubmitContest() Contest {
	return Contest{contestIn{os.Stdin}, contestOut{os.Stdout}}
}

func NewTestContest(testIn string, testOut *bytes.Buffer) Contest  {
	return Contest{contestIn{strings.NewReader(testIn)}, contestOut{testOut}}
}

func (in contestIn) Var(a interface{}) {
	fmt.Fscan(in.reader, a)
}

func (in contestIn) Vars(a interface{}) {
	fmt.Fscanln(in.reader, a)
}

func (in contestIn) Ints(len int) []int {
	arr := make([]int, 0, len)
	for ; len > 0; len-- {
		var i int
		in.Var(&i)
		arr = append(arr, i)
	}

	return arr
}

func (out contestOut) Str(s string)  {
	fmt.Fprintf(out.writer, "%s", s)
}

func (out contestOut) Nl()  {
	fmt.Fprint(out.writer, "\n")
}

// http://com/problemset/problem/4/A
func problem(c Contest)  {
	var w int
	c.In.Var(&w)

	if w % 2 == 0 {
		c.Out.Str("YES")
	} else {
		c.Out.Str("NO")
	}

	c.Out.Nl()
}

func main() {
	c := NewSubmitContest()
	problem(c)
}


package main

import (
	"fmt"
	"os"
)

func main() {
	var a int
	//fmt.Print("Введите вес арбуза: ")
	fmt.Fscan(os.Stdin, &a)
	m := a%2
	if m == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	var w uint8
	fmt.Fscanf(in, "%d\n", &w)

	if w % 2 == 0{
		fmt.Println("YES")
	}else{
		fmt.Println("NO")
	}
}


package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	var w uint8
	fmt.Fscanf(in, "%d\n", &w)
	if w == 2 {
		fmt.Println("NO")
	}
	if w % 2 == 0{
		fmt.Println("YES")
	}else{
		fmt.Println("NO")
	}
}


package main

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

func main() {
	w, _ := strconv.Atoi(os.Args[1])

	if w%2 == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}

}


package main

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

func main() {

	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	w, _ := strconv.Atoi(scanner.Text())

	if w <= 100 {
		if w >= 1 {
			if w%2 == 0 {
				fmt.Println("YES")
			} else {
				fmt.Println("NO")
			}
		}

	}
}


package main

import (
	"fmt"
)

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

	if a%2 == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


func main() {

    var w = 80

    for i := 0; i < w; i++ {
        other := w-i
        if other % 2 == 0 && w % 2 == 0 {
            fmt.Print("true")
            return true
        }
    }
    return false

}


package main

import (
    "fmt"
)

func main() {

    var w int
    fmt.Scan(&w)

    for i := 0; i < w; i++ {
        other := w-i
        if other % 2 == 0 && w % 2 == 0 {
            fmt.Print("YES")
            return
        }
    }
    fmt.Print("NO")

}


package main

import "fmt"

func main() {
	var i int
	_, err := fmt.Scanf("%d", &i)

	if err != nil {
		panic(err)
	}

	if i-2 > 2 && (i-2)%2 == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import "fmt"

func main() {
    var melon int
    fmt.Scanln(&melon)
    if melon % 2 == 1 || melon == 0 {
        fmt.Println("NO")
    } else {
        fmt.Println("YES")
    }
}


package main

import "fmt"

func main() {
    var melon int
    fmt.Scanln(&melon)
    if melon % 2 == 1 || melon == 0: {
        fmt.Println("NO")
    } else {
        fmt.Println("YES")
    }
}


package main

import (
    "fmt"
)

func main() {
    var w int
    fmt.scanf("%d", &w)
    if w % 2 == 0 {
        fmt.println("YES")
    } else {
        fmt.println("NO")
    }

    return 0
}


package main

import (
        "fmt"
)

func main() {
        var w int
        fmt.Scanf("%d", &w)
        if w%2 == 0 {
                fmt.Println("YES")
        } else {
                fmt.Println("NO")
        }
        return
}


package main

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

func main(){
    var n int
    fmt.Scan(&n)
    if n % 2 == 0 && n > 2{
        fmt.Println("YES")
    }else{
        fmt.Println("NO")
    }
}


package main

import (
	"fmt"
)

// THIS WAS JUST TO TEST IF CODEFORCES UNDERSTAND GOLANG

/*
One hot summer day Pete and his friend Billy decided to buy a watermelon.
hey chose the biggest and the ripest one, in their opinion.
After that the watermelon was weighed, and the scales showed w kilos.
They rushed home, dying of thirst, and decided to divide the berry, however they faced a hard problem.

Pete and Billy are great fans of even numbers,
that's why they want to divide the watermelon in such a way that each of the two parts weighs even number of kilos,
at the same time it is not obligatory that the parts are equal.
The boys are extremely tired and want to start their meal as soon as possible
that's why you should help them and find out, if they can divide the watermelon in the way they want.
For sure, each of them should get a part of positive weight.

Input
The first (and the only) input line contains integer number w (1 ≤ w ≤ 100) — the weight of the watermelon bought by the boys.
Output
Print YES, if the boys can divide the watermelon into two parts, each of them weighing even number of kilos; and NO in the opposite case.
*/

func main() {
	var number int

	_, err := fmt.Scanf("%d", &number)

	if err != nil {
		panic(err)
	}

	canDevide(number)

}

func canDevide(number int) {
	if number%2 == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

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

func main() {
	r := bufio.NewReader(os.Stdin)
	in, err := r.ReadString('\n')

	if err != nil {
		log.Fatalf("could not read from input: %v", err)
	}

	w, err := strconv.Atoi(in)
	if err != nil {
		log.Fatalf("could not convert input: %v", err)
	}
	if w % 2 != 0 {
		fmt.Println("NO")
		return
	}

	fmt.Println("YES")
}


package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	text, err := reader.ReadString('\n')
	if err != nil {
		fmt.Println(err)
		return
	}
	text = strings.ReplaceAll(text, "\r", "")
	w, err := strconv.Atoi(text)
	if err != nil {
		fmt.Println(err)
		return
	}
	if w < 3 || w % 2 != 0 {
		fmt.Print("NO")
		return
	}
	fmt.Print("YES")
}


package main
import "fmt"
func main()
{
    var n int
    fmt.Scan(&n)
    if n%2==0{
        fmt.Print("Yes")
    }
    else{
        Print("No")
    }
}


package main
import "fmt"
func main() {
	var n int
	fmt.Scan(&n)
	if n%2==0 {
		fmt.Print("Yes")
	} else {
		fmt.Print("No")
	}
}


package main

import (
        "fmt"
    )

func main() {
    var kilos int = 0
    fmt.Scan(kilos)
    if kilos < 2 {
        fmt.Println("NO")
    }
    else if kilos%2 == 0 {
        fmt.Println("YES")
    }
    else {
        fmt.Println("NO")
    }

}


package main

import (
        "fmt"
    )

func main() {
    var kilos int = 0
    fmt.Scan(kilos)
    if kilos > 2 && kilos%2 == 0  {
        fmt.Println("YES")
    } else {
        fmt.Println("NO")
    }

}


package main

import "fmt"

func main() {
	var weight int
	fmt.Scanln(&weight)
	if weight%4 == 0 {
		fmt.Print("YES")
	} else {
		fmt.Print("NO")
	}
}


package main

import "fmt"

func main() {
	var a int
	fmt.Scanln(&a)
		if a%2 == 0 {
			b:=a/2
			if  b%2==0 {
				fmt.Println("YES")
			} else if a==2{
				fmt.Println("NO")
				c:=b-1
				d:=b+1
				if c%2==0&&d%2==0 {
					fmt.Println("YES")
				} else {
					fmt.Println("NO")
				}
			}
		} else {
			fmt.Println("NO")
		}
}


package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	str, _ := reader.ReadString('\r')
	str = str[:len(str)-1]
	n, _ := strconv.Atoi(str)
	for i := 2; i <= n/2; i++ {
		if (n/i)%2 == 0 {
			fmt.Println("YES")
			return
		}
	}

	fmt.Println("NO")
}


package main

import "fmt"

func main() {
	var n int8
	fmt.Scanln(&n)
	if n%2 == 0 {
		fmt.Println("Mahmoud")
	} else {
		fmt.Println("Ehab")
	}
}


package main

import (
	"fmt"
)

func main () {
	var n int
	var move = "Mahmoud"
	_, _ = fmt.Scan(&n)
	for true {
		if move == "Mahmoud" {
			if n >= 2 {
				n -= 2
				move = "Ehab"
			} else {
				fmt.Println("Ehab")
				break
			}
		} else {
			if n >= 1 {
				n -= 1
				move = "Mahmoud"
			} else {
				fmt.Println("Mahmoud")
				break
			}
		}
	}
}


// Codeforces helper functions
// 20 Jan 18
// samadhi

package main

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

const debug = true

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

	n := gsli(reader)[0]

	if n%2 == 0 {
		fmt.Println("Mahmoud")
	} else {
		fmt.Println("Ehab")
	}

}

}

// Input helpers

// If you don't pass in a reference to the reader, and just instantiate a new
// one every time, it will work locally, with IO typed at human-speed, but not
// on Codeforces.

// Get Space-separated Line as Strings
//
// Example input:
// 1 test 382.0
// Example output:
// ["1", "test", "382.0"]

func gsls(reader *bufio.Reader) (arr []string) {
	// Get a full line
	input, _ := reader.ReadString('\n')

	//Strip newline and return chars, if any
	input = strings.TrimSuffix(input, "\n")
	input = strings.TrimSuffix(input, "\r")

	// Split at the spaces into an array
	arr = strings.Split(input, " ")

	return
}

// Get Space-separated Line as Integers
// Any non-valid integers will be 0
//
// Example input:
// test 1 12.3 -117
// Example output:
// [0, 1, 0, -117]

func gsli(reader *bufio.Reader) (arr []int) {
	stringArr := gsls(reader)

	for _, e := range stringArr {
		cur, _ := strconv.Atoi(e)
		arr = append(arr, cur)
	}

	return
}

// Get Space-separated Line as 64-bit Floats
// Any non-valid floats will be 0
//
// Example input:
// test 128.328 12 -11.0
// Example output:
// [0, 128.328, 12, -11]

func gslf(reader *bufio.Reader) (arr []float64) {
	stringArr := gsls(reader)

	for _, e := range stringArr {
		cur, _ := strconv.ParseFloat(e, 64)
		arr = append(arr, cur)
	}

	return
}

// String helpers

// Is Lowercase
// Given some string[i], return whether it is lower case or not.

func isl(b byte) bool {
	var r rune
	r = rune(b)
	return unicode.IsLower(r)
}

// Math helpers

// Positve Modulo
// Returns x mod y, but always positive

func posMod(x, y int) int {
	return (x%y + y) % y
}

// Max Int
// Returns the max of two ints

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

// Distance formule
// Calculates the distance to the origin

func dist(x, y float64) float64 {
	return math.Sqrt(math.Pow(x, 2) + math.Pow(y, 2))
}

// Output helpers

func yes() {
	fmt.Println("Yes")
}

func no() {
	fmt.Println("No")
}

// Debug helpers

// From https://groups.google.com/forum/#!topic/golang-nuts/Qlxs3V77nss

func dbg(s string, a ...interface{}) {
	if debug {
		fmt.Printf(s, a...)
	}
}


package main

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

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

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

func main() {
	// FLUSH STDOUT
	defer writer.Flush()

	var a int
	scanf("%d\n", &a)

	if a%2 == 1 {
		printf("Ehab\n")
	} else {
		printf("Mahmoud\n")
	}

}


package main
import (
	"fmt"
)
func main() {
	var k,i,j,t int
	var s string
	fmt.Scan(&s,&k)

	n:=0
	var swap rune
	rune := make([]rune, len(s))
        for _, r := range s {
                rune[n] = r
                n++
        }
        rune = rune[0:n]
	for i=0;i+1<len(s);i++ {
		t=i
		for j=i+1;j<len(s)&&j-i<=k;j++ {
			if s[j]>s[t] {
				t=j
			}
		}
		k-=t-i
		for ;t!=i; {
			swap = rune[t]
			rune[t]=rune[t-1]
			rune[t-1]=swap
			t--
		}
	}
	fmt.Println(string(rune))
}


package main

import (
	"fmt"
	"math"
)
func main(){
	var x,y,z int
	fmt.Scan(&x,&y,&z)
	max:=math.Max(float64(x),math.Max(float64(y),float64(z)))
	min:=math.Min(float64(x),math.Min(float64(y),float64(z)))
	dest:=(max+min)/2
	ans:=math.Abs(dest-float64(x))+math.Abs(dest-float64(y))+math.Abs(dest-float64(z))
	fmt.Println(ans)

}


package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	var a [3]int
	fmt.Fscan(in, &a[0], &a[1], &a[2])
	min, max := minmax(a)
	mid := (max + min) / 2
	dis := 0
	for _, v := range a {
		dis += abs(v - mid)
	}
	fmt.Println(dis)
}

func minmax(a [3]int) (int, int) {
	min := a[0]
	max := a[0]
	for i := 1; i < len(a); i++ {
		if a[i] < min {
			min = a[i]
		}
		if a[i] > max {
			max = a[i]
		}
	}
	return min, max
}
func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}


package main

import (
	"fmt"
	"math"
)

func main(){
	var x1,x2,x3 int
	fmt.Scanf("%d %d %d\n",&x1,&x2,&x3)
	x0 := (x1+x2+x3)/3
	out := math.Abs(float64(x0-x1))+math.Abs(float64(x0-x2))+math.Abs(float64(x0-x3))
	fmt.Println(int(out))
}


package main

import 	(
	"fmt"
	"math"
)

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

	min := math.Abs(a - b) + math.Abs(b - c)

	min = math.Min(min, math.Abs(b - c) + math.Abs(a - c))

	fmt.Println(min)

}


package main

import (
  "fmt"
  "math"
)

func main() {
  var x1, x2, x3 float64
  fmt.Scan(&x1, &x2, &x3)
  left := math.Min(math.Min(x1, x2), x3)
  right := math.Max(math.Max(x1, x2), x3)
  mid := (right - left) / 2
  mid += left
  answer := math.Max(x1, mid) - math.Min(x1, mid)
  answer += math.Max(x2, mid) - math.Min(x2, mid)
  answer += math.Max(x3, mid) - math.Min(x3, mid)
  fmt.Println(int(answer))
}


package main

import "fmt"

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

func main() {
	var n = 3
	nums := make([]int, n)
	var sum int
	for i := 0; i < n; i++ {
		fmt.Scan(&nums[i])
		sum += nums[i]
	}
	avg := sum / n
	var distance int

	for i := 0; i < n; i++ {
		distance += abs(nums[i] - avg)
	}
	fmt.Print(distance)
}


package main

import "fmt"

func main() {
    var x, y, a, b int
    fmt.Scanf("%d %d %d %d", &x, &y, &a, &b)
    fmt.Print(b/(x*y) - (a-1)/(x*y))
}


package main

import (
	. "fmt"
	"io"
	"math/bits"
	"os"
)

// github.com/EndlessCheng/codeforces-go
func CF627A(in io.Reader, out io.Writer) {
	var s, x, ans int64
	Fscan(in, &s, &x)
	if d := s - x; d >= 0 && d&1 == 0 && d/2|x == d/2+x {
		if d == 0 {
			x--
		}
		ans = int64(1) << bits.OnesCount64(uint64(x))
	}
	Fprint(out, ans)
}

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


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 main() {
  scanner = bufio.NewScanner(os.Stdin)
  scanner.Split(bufio.ScanWords)
  writer := bufio.NewWriter(os.Stdout)
  defer writer.Flush()

  _, a := getI(), getI64()
  digits := make([]int, 10)
  for a != 0 {
    d := a%10
    if d == 4 {
      digits[3]++
      digits[2] += 2
    } else if d == 6 {
      digits[5]++
      digits[3]++
      digits[2]++
    } else if d == 8 {
      digits[7]++
      digits[2] += 3
    } else if d >= 2 {
      digits[d]++
    }
    a /= 10
  }
  for d := 9; d >= 2; d-- {
    for i := 0; i < digits[d]; i++ {
      writer.WriteString(fmt.Sprintf("%d", d))
    }
  }
  writer.WriteString("\n")
}


package main

import (
	"fmt"
	"sort"
)

func main() {
	m := map[int][]int{
		0: {},
		1: {},
		2: {2},
		3: {3},
		4: {3, 2, 2},
		5: {5},
		6: {5, 3},
		7: {7},
		8: {7, 2, 2, 2},
		9: {7, 3, 3, 2},
	}

	s := []int{}
	len := 0
	fmt.Scan(&len)
	var input int64
	fmt.Scan(&input)

	for len > 0 {
		k := input % 10
		input /= 10
		s = append(s, m[int(k)]...)
		len--
	}
	sort.Sort(sort.Reverse(sort.IntSlice(s)))
	for _, v := range s {
		fmt.Print(v)
	}

}


package main

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

func main() {
    //io
    scanner := bufio.NewReader(os.Stdin)
    writer := bufio.NewWriter(os.Stdout)
    //---
    var n int
    var used [20]int
    var s string
    fmt.Fscan(scanner, &n)
    fmt.Fscan(scanner, &s)

    for i := 0; i < n; i++ {
        a := s[i] - '0'
        if a % 2 == 1 || a == 2 {
            used[a]++
        } else if a == 4 {
            used[2] += 2
            used[3]++
        } else if a == 6 {
            used[5]++
            used[3]++
        } else if a == 8 {
            used[2] += 3
            used[7]++
        }
    }
    for i := 9; i > 1; i-- {
        for used[i] > 0 {
            writer.WriteString(strconv.Itoa(i))
            used[i]--
        }
    }
    writer.Flush()
}


package main

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

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

	sc.Scan()
	sc.Scan()

	m := map[byte]string{
		'2': "2",
		'3': "3",
		'4': "322",
		'5': "5",
		'6': "53",
		'7': "7",
		'8': "73222",
		'9': "73332",
	}

	ans := ""
	for _, x := range sc.Bytes() {
		ans += m[x]
	}
	sorted := ""
	sorted += strings.Repeat("7", strings.Count(ans, "7"))
	sorted += strings.Repeat("5", strings.Count(ans, "5"))
	sorted += strings.Repeat("3", strings.Count(ans, "3"))
	sorted += strings.Repeat("2", strings.Count(ans, "2"))

	fmt.Println(sorted)
}


package main

import "fmt"

func main() {
	var a int
	fmt.Scan(a)
	if a%2 == 1 || a == 2 {
		fmt.Println("NO")
	} else {
		fmt.Println("YES")
	}
}


package main

import "fmt"

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

	if weight == 2 {
		fmt.Printf("NO\n")
	} else if weight%2 == 0 {
		fmt.Printf("YES\n")
	} else {
		fmt.Printf("NO\n")
	}
}


package main

import "fmt"

func main() {

	var x int
	fmt.Scanf("%d", &x)
	if x % 2 == 1 {
		if x > 2 && (x - 2) % 2 == 0 {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	} else {
		fmt.Println("YES")
	}

}


package main
import "fmt"

func main(){
	// your code goes here
	var w int
	fmt.Scan(&w)
	result := "NO"
	if w % 2 == 0 {
		result = "YES"
	}
	fmt.Println(result)
}


package main
import "fmt"

func main(){
	// your code goes here
	n := 0
	fmt.Scan(&n)
	if n % 2 == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
		}
}


package main

import "fmt"

func main() {

	var w int
	fmt.Scan(&w)
	if w >= 4 && w <= 100 && w % 2 == 0{
		println("YES")
	}else{
		println("NO")
	}
}


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

func main() {
	reader := bufio.NewReader(os.Stdin)
	input_string, _ := reader.ReadString('\n')
	input, _ := strconv.Atoi(input_string[:len(input_string)-1])
	answer := 0
	if input%2==0 {
		answer = 1
	}
	if answer == 0 {
		fmt.Println("NO")
	} else {
		fmt.Println("YES")
	}
}


package main

import "fmt"

func main() {
  var n int
  fmt.Scanf("%d\n", &n)
  if n >= 2 && n <= 100 {
    if n % 2 == 0 {
      fmt.Printf("YES\n")
    } else {
      fmt.Printf("NO\n") }
    }
}


package main

import "fmt"

func main() {
  var n int
  fmt.Scanf("%d\n", &n)
  if n % 2 != 0 {
    fmt.Printf("NO\n")
  }  if n <= 2 {
    fmt.Printf("NO")
  } else {
    fmt.Printf("YES\n")
  }
}


//1.11 | CodeForces.Com
package main
import "fmt"
func main()
{
    var weight int8
    fmt.Scan(&weight)

    if(weight & 1 == 1 || weight == 2) {
        fmt.Print("NO")
    } else {
        fmt.Print("YES")
    }
}


package main

import "fmt"

func main() {
	var n int
	var cont int
	fmt.Scanf("%d", &n)
	for i := 1; i < n; i++ {
		if i%2 == 0 {
			if n%i == 0 {
				cont++
			}
		}
	}
	if cont >= 2 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import "fmt"

func main() {
	var number int
	_, err := fmt.Scanf("%d", &number)
	if err != nil {
		fmt.Println("NO")
		return
	}

	if number <= 1 || number >= 100 {
		fmt.Println("NO")
		return
	}
	if number == 2 {
		fmt.Println("NO")
		return
	}
	if number%2 == 0 {
		fmt.Println("YES")
		return
	} else {
		fmt.Println("NO")
		return
	}

}


package main

import "fmt"

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

	if n%2 == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


import (
    "fmt"
)

func main() {

    var w int
    fmt.Scanf("%d\n",&w)

    if w % 2 == 0 {
        fmt.Println("YES")
    } else {
        fmt.Println("NO")
    }

}


package main

import (
	"fmt"
)

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

	if w % 2 == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import "fmt"

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

	if w&1 == 1 || (w>>1)&1 == 1 {
		fmt.Println("NO")
	} else {
		fmt.Println("YES")
	}
}


package main

import (
	"fmt"
	"strings"
)

func main() {
	var w float64
	_, _ = fmt.Scanf("%f", &w)

	fmt.Println(Run(w))
}

func Run(w float64) string {
	if strings.Contains(fmt.Sprint(w/2), ".") {
		return "NO"
	}

	return "YES"
}


package main

import (
	"fmt"
	"math"
)

func main() {
	var w int
	if(w % 2 == 0){
		fmt.println("YES")
	}else{
		fmt.println("NO")
	}
}


package main

import (
	"fmt"
)

func main() {
	var w int
	fmt.Scanf("%d",&w)
	if(w > 2){
		if(w % 2 == 0){
			fmt.Println("YES")
		}else{
			fmt.Println("NO")
		}
	}

}


package main

import "fmt"

func check(n int) int {
	return n%2
}

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

	if check(n) == 0 && n != 2 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import "fmt"

func check(n int) int {
	return n%2
}

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

	if check(n) == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import (
	"fmt"
)

func main() {
	var w int
	fmt.Scanf("%d\n", &w)
	// even
	if w%2 == 0 {
		if (w/2)%2 == 0 {
			fmt.Printf("YES")
		} else {
			fmt.Printf("NO")
		}
	} else {
		fmt.Printf("NO")
	}
}


package main

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

func main() {
	sc := NewScanner()
	N, A := sc.NextInt(), sc.NextInt()

	S := sc.NextLine()

	mp := map[byte]int{}

	for i := 0; i < N; i++ {
		mp[S[i]]++
	}

	for _, v := range mp {
		if v<A{
			fmt.Println("NO")
			return
		}
	}
	fmt.Println("YES")

}

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

var ans int64
var tmp int64

func main() {
	fmt.Scan(&ans)
	for i := int64(1); i <= int64(math.Sqrt(float64(ans))); i++ {
		res := (ans - int64(math.Pow(float64(i), 2)) - i - 1) / 2 * i
		if res < 0 {
			continue
		}
		tmp = int64(math.Pow(float64(i), 2)) + 2*i*res + i + 1
		if tmp == ans {
			fmt.Println(i, res)
			return
		}
	}
	fmt.Println("NO")
}

//250877914575
//1 125438957286

//260158260522
//NO


package main

import (
	"fmt"
	"math"
)

var ans int64
var tmp int64

func main()  {
	fmt.Scan(&ans)
	for i:=int64(1); i <= int64(math.Sqrt(float64(ans))); i++ {
		for j:=ans/2; j > 0; j=j-i {
			tmp = int64(math.Pow(float64(i),2)) + 2 * i * j + i + 1
			if tmp == ans {
				fmt.Println(i , j)
				return
			}
		}
	}
	fmt.Println("NO")
}

//250877914575
//1 125438957286


package main

import (
	"fmt"
)

func main() {
	kilos := 0
	fmt.Scanf("%d", &kilos)

	if kilos%2 != 0 {
		fmt.Println("NO")
		return
	}

	if (kilos/2)%2 != 0 {
		fmt.Println("NO")
		return
	}
	fmt.Println("YES")
}


package main

import "fmt"

func main() {
	var w int
	fmt.Scanf("%d", &w)
	if w <= 2 {
		fmt.Println('NO')
	}
	if w % 2 == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import "fmt"

func main() {
	var w int
	fmt.Scanf("%d", &w)
	if w % 2 == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

func main() {
	a := flag.Args()
	i, _ := strconv.Atoi(a[0])
	fl := float64(i)

	if math.Mod(fl, 2) == 0{
		println("YES")
	} else {
		println("NO")
	}
}


package main

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

func main() {
	x := os.Args[1:]
	i, _ := strconv.Atoi(x[0])
	fl := float64(i)

	if math.Mod(fl, 2) == 0 {
		fmt.Print("YES")
	} else {
		fmt.Print("NO")
	}
}


package main

import (
	"fmt"
	"math"
	"strconv"
)

func main() {
	var n string
	_, _ = fmt.Scanln(&n)
	i, _ := strconv.ParseInt(n, 10, 64)
	fl := float64(i)

	if math.Mod(fl, 2) == 0 {
		fmt.Print("YES")
	} else {
		fmt.Print("NO")
	}
}


package main

import "fmt"

func task_solution(n int) string {
	possible_ans := []string{"YES", "NO"}

	return possible_ans[n%2]
}

func main() {
	var n int
	_, err := fmt.Scan(&n)
	if err != nil {
		panic(err)
	}

	fmt.Println(task_solution(n))
}


package main

import (
	"fmt"
)

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

	if w % 2 == 0 && (w != 2) && 1<=w && w<=100 {
		fmt.Println("YES")
	}
	if w % 2 == 1 && 1<=w && w<=100 {
		fmt.Println("NO")
	}
}


package main

import (
	"fmt"
)

func main() {
	var weight = 0
	_, err := fmt.Scanf("%d", &weight)
	if err != nil {
		panic(err)
	}

	if isEven(weight) && weight > 3 {
		if weight % 4 == 0 {
			println("YES")
			return
		}

		if (weight - 2) % 4 == 0 {
			println("YES")
			return
		}
	}

	println("NO")
	return
}

func isEven(n int) bool {
	return n % 2 == 0
}


package main

import (
	"fmt"
)

func main() {
	var weight = 0
	_, err := fmt.Scanf("%d", &weight)
	if err != nil {
		panic(err)
	}

	if weight % 2 == 0 && weight != 2 {
		fmt.Print("YES")
	}

	fmt.Print("NO")
	return
}


package main

import (
	"fmt"
	"strconv"
)

func main() {
	var n string
	fmt.Scanln(&n)

	//reader := bufio.NewReader(os.Stdin)
	//for true {
	//	text, _ := reader.ReadString('\n')
	//	value, _ := strconv.Atoi(strings.Trim(text, "\n"))
	value, _ := strconv.Atoi(n)
		impl(value)
	//}
}

func impl(n int) {
	if n % 2 == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	for true {
		text, _ := reader.ReadString('\n')
		value, _ := strconv.Atoi(strings.Trim(text, "\n"))
		impl(value)
	}
}

func impl(n int) {
	if n % 2 == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import "fmt"

func main() {
	var w int
	fmt.Scan(&w)
	if w%2 == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main
import "fmt"
func main() {
	var w int
	fmt.Scan(&w)
	if w%2 == 0 && w > 2 {
		fmt.Println("YES")
	}
	else {
		fmt.Println("NO")
	}
}


package main

import (
	"fmt"
)

func main() {
	var int n
	fmt.Scanf("%d", &n)
	if n%2 == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scanf("%d", &n)
	if n == 2 || n%2 == 1 {
		fmt.Println("NO")
	} else {
		fmt.Println("NO")
	}
}


package main

import (
	"fmt"
)

func check(nums []int) bool {
	i := 1

	for ; i < len(nums); i++ {
		if nums[i] <= nums[i-1] {
			break
		}
	}

	// fmt.Println("Stop increasing ", i)

	for ; i < len(nums); i++ {
		if nums[i] > nums[i-1] {
			return false
		}

		if nums[i] < nums[i-1] {
			break
		}
	}

	// fmt.Println("Stop constant ", i)

	if i == 1 && len(nums) != 1 {
		return false
	}

	for ; i < len(nums); i++ {
		if nums[i] >= nums[i-1] {
			return false
		}
	}

	// fmt.Println("Stop decreasing ", i)
	return i == len(nums)
}

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

	nums := make([]int, t)

	for i := 0; i < t; i++ {
		fmt.Scanf("%d", &nums[i])
	}

	fmt.Println(nums)
	if check(nums) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main
import (
       	"fmt"
)
func main() {
       	var n,a int
       	fmt.Scan(&n)
       	c,e,em:=0,0,-1
       	for i:=0;i<n;i++ {
       		fmt.Scan(&a)
       		if a==1 {
       			c++
       			if e>0 {
       				em--
       			}
       		} else {
       			e++
       			if e>em {
       				em=e
       			}
       		}
       	}
       	fmt.Println(c+em)
}


package main

import "fmt"

func main(){
        var n, cur, ans int
        fmt.Scan(&n)
        input, prefix := make([]int, n), make([]int, n)
        for i:=0; i<n; i++ {
                fmt.Scan(&input[i])
        }
        prefix[0] = input[0]
        for i:=1; i<n; i++ {
                prefix[i] = prefix[i-1] + input[i]
        }
        ans = 0
        for i:=0; i<n; i++ {
                for j:=i; j<n; j++ {
                        if i>0 {
                                cur = prefix[i-1]
                        }else {
                                cur=0
                        }
                        if j>0 {
                                cur += prefix[n-1]-prefix[j-1]
                        }else {
                                cur += prefix[n-1]
                        }
                        if i>0 {
                                cur += (j-i+1)-(prefix[j]-prefix[i-1])
                        }else {
                                cur += (j-i+1)-prefix[j]
                        }
                        if cur > ans {
                                ans = cur
                        }
                }
        }
        fmt.Println(ans)
}


// http://codeforces.com/problemset/problem/327/A
package main

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

// (c) Dmitriy Blokhin (sv.dblokhin@gmail.com)

const (
	MOD = 1e9 + 7
)

type (

)

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

	return b
}

func main () {
	var (
		n int
	)

	//f, _ := os.Open("input.txt")
	//input := bufio.NewReader(f)
	input := bufio.NewReader(os.Stdin)

	fmt.Fscanln(input, &n)
	a := make([]int, n)
	f := make([][3]int, n)  /// unchanged, prev is changed, current is change (flip)
	ma := 0

	for i := 0; i < n; i++ {
		fmt.Fscan(input, &a[i])

		if i == 0 {
			f[i][0] = a[i]
			f[i][1] = 1 - a[i]
			f[i][2] = a[i]
			continue
		}

		f[i][0] = f[i - 1][0] + a[i]
		f[i][1] = max(f[i - 1][0], f[i - 1][1]) + (1 - a[i])
		f[i][2] = max(f[i - 1][2], max(f[i - 1][1], f[i - 1][0])) + a[i]
	}

	ma = max(ma, f[n - 1][0])
	ma = max(ma, f[n - 1][1])
	ma = max(ma, f[n - 1][2])

	fmt.Println(ma)
}


package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scanf("%d\n", &n)
	a := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Scanf("%d", &a[i])
	}
	// initialize dp array
	d := make([][]int, n)
	for i := 0; i < n; i++ {
		d[i] = make([]int, i+1)
	}

	max := 1
	for i := 0; i < n; i++ {
		for j := 0; j <= i; j++ {
			d[i][j] = OnesAfterFlip(a, j, i)
			if max < d[i][j] {
				max = d[i][j]
			}
		}
	}
	fmt.Println(max)
}

func OnesAfterFlip(a []int, i, j int) (ans int) {
	arr := make([]int, len(a))
	copy(arr, a)

	for idx := i; idx <= j; idx++ {
		arr[idx] = 1 - arr[idx]
	}
	// fmt.Printf("%v\n", arr)
	for idx := 0; idx < len(arr); idx++ {
		ans += arr[idx]
	}
	// fmt.Printf("%d:%d %d\n\n", i, j, ans)
	return
}


package main

import "fmt"

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

func main() {
    var n int
    var a [105]int
    fmt.Scan(&n)
    cnt := 0
    for i := 0; i < n; i++ {
        fmt.Scan(&a[i])
        if a[i] == 1 { cnt++ }
    }
    ans := cnt
    for i := 0; i < n; i++ {
        tmp := cnt
        for j := i; j < n; j++ {
            if a[j] == 1 { tmp-- } else { tmp++ }
            ans = max(ans,tmp)
        }
    }
    fmt.Println(ans)
}


package main

import "fmt"

func Max(x, y int) int {
    result := x
    if y > x {
        result = y
    }

    return result
}

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

    a := make([]int, n)
    diff := make([][]int, n)
    count := make([]int, n)

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

        last += next
        count[i] = last

    /*    var val int = 1
        if next == 1 {
            val = -1
        }
        diff[i + 1] = diff[i] + val
        count[i + 1] = count[i] + next*/
    }

    diff[0][0] = (1 - a[0])
    var max int = diff[0][0]
    for i := 1; i < n; i++ {
        for j := 0; j < i; j++ {
            diff[j][i] = (i - j) - (count[i] - count[j])
            max = Max(max, diff[j][i] + count[j] + count[n - 1] - count[i])
        }
    }

    fmt.Println(max)
}


package main

import "fmt"

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

	//fmt.Print(bf(n, a))
	fmt.Print(obs(n, a))
}

// O(n)
func bf(n int, a []int) int {
	max := 0
	for i := 0; i < n; i++ {
		for j := i; j < n; j++ {
			t := make([]int, n)
			for k := 0; k < n; k++ {
				if k >= i && k <= j {
					t[k] = 1 - a[k]
				} else {
					t[k] = a[k]
				}
			}
			s := 0
			for k := 0; k < n; k++ {
				if t[k] == 1 {
					s++
				}
			}
			if s > max {
				max = s
			}
		}
	}
	return max
}

// O(n^2)
func obs(n int, a []int) int {
	t := make([]int, n)
	for i := 0; i < n; i++ {
		if a[i] == 0 {
			t[i] = 1
		} else {
			t[i] = -1
		}
	}
	S := 0
	for i := 0; i < n; i++ {
		if a[i] == 1 {
			S++
		}
	}
	var f0, l0 int
	for f0 = 0; f0 < n && a[f0] == 1; f0++ {
	}
	for l0 = n - 1; l0 >= 0 && a[l0] == 1; l0-- {
	}
	m := 0
	for i := f0; i <= l0; i++ {
		s := 0
		for j := i; j <= l0; j++ {
			s += t[j]
			if s > m {
				m = s
			}
		}
	}
	if m == 0 {
		return 0
	}
	return S + m
}

// O(n) ?
func dp(n int, a []int) int {
	return 0
}

func max(a, b int) int {

	if a > b {
		return a
	}
	return b
}


package main

import (
	"fmt"
)

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

	return b
}

func main() {
	var numbers int

	fmt.Scanln(&numbers)

	buf := make([]int, numbers)
	memoized := make([]int, numbers)

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

	// 1. 코스트 함수
	// With interval i..j
	// a[i..j].count(0) > a[i..j].count(1)
	// 2. 옵티마이저 함수
	// With interval i..j
	// max(cost(i, j), cost(i, j+ 1))
	// 3. 약간의 memoization
	var globalMax int = 1 - buf[0] // initializing base state

	for i := 0; i < numbers; i++ {
		// 여기에서 초기화를
		memoized[i] = 1 - buf[i]
		var localMax int

		for j := i+1; j < numbers; j++ {
			localMax = intMax(memoized[j-1], j - i + 1 - buf[j-1])
			memoized[j] = localMax

			if localMax > globalMax {
				globalMax = localMax

				_ = fmt.Errorf("Update globalMax to %d at %d..%d", globalMax, i, j)
			}
		}
	}

	fmt.Println(globalMax)
}


package main

import "fmt"

var a [100]int

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

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

	max := 0
	for i := 0; i < n-1; i++ {
		for j := i + 1; j < n; j++ {
			sum := 0
			for k := i; k <= j; k++ {
				if a[k] == 0 {
					sum += 1
				}
			}
			for k := 0; k < i; k++ {
				if a[k] == 1 {
					sum += 1
				}
			}
			for k := j; k < n; k++ {
				if a[k] == 1 {
					sum += 1
				}
			}

			if sum > max {
				max = sum
			}
		}
	}

	fmt.Println(max)
}


package main

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

var sc *bufio.Scanner = bufio.NewScanner(os.Stdin)
var w *bufio.Writer = bufio.NewWriter(os.Stdout)

func ni() int {
  sc.Scan()
  ans, _ := strconv.Atoi(sc.Text())
  return ans
}

func nll() int64 {
  sc.Scan()
  ans, _ := strconv.ParseInt(sc.Text(), 10, 64)
  return ans
}

func next() string {
  sc.Scan()
  return sc.Text()
}

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

func Min(i, j int) int {
  if i < j {
    return i
  }
  return j
}

func pri(n int)    { w.WriteString(strconv.Itoa(n)) }
func prll(n int64) { w.WriteString(strconv.FormatInt(n, 10)) }
func sp()          { w.WriteByte(' ') }
func endl()        { w.WriteByte('\n') }

func main() {
  sc.Split(bufio.ScanWords)
  n := ni()
  a := make([]int, n)
  for i := 0; i < n; i++ {
    a[i] = ni()
  }
  ans := 0
  for l := 0; l < n; l++ {
    for r := l; r < n; r++ {
      cnt, cnt0 := 0, 0
      for i := 0; i < l; i++ {
        if a[i] == 1 {
          cnt0++
        }
      }
      for i := r + 1; i < n; i++ {
        if a[i] == 1 {
          cnt0++
        }
      }
      for i := l; i <= r; i++ {
        if a[i] == 1 {
          cnt--
        } else {
          cnt++
        }
      }
      ans = Max(ans, cnt+cnt0)
    }
  }
  pri(ans)
  w.Flush()
}


package main

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

func Readln(r *bufio.Reader) (string, error) {
	var (
		isPrefix bool  = true
		err      error = nil
		line, ln []byte
	)
	for isPrefix && err == nil {
		line, isPrefix, err = r.ReadLine()
		ln = append(ln, line...)
	}
	return string(ln), err
}

func readIntArray(line string) []int {

	numStrings := strings.Split(strings.TrimSpace(string(line)), " ")

	numbers := make([]int, 0)

	for _, v := range numStrings {
		var converted int

		fmt.Sscanf(v, "%d", &converted)
		numbers = append(numbers, converted)
	}

	return numbers
}

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

	Readln(reader)
	line, _ := Readln(reader)
	numbers := readIntArray(line)

	seq := make([]int, 0)
	for _, val := range numbers {
		seqVal := 1

		if val == 1 {
			seqVal = -1
		}
		seq = append(seq, seqVal)
	}

	maxSum, sum := 0, 0
	leftIdx, rightIdx := 0 , 0
	minusPos := -1
	for idx, seqVal := range seq {
		sum += seqVal

		if sum > maxSum {
			maxSum = sum
			leftIdx = minusPos + 1
			rightIdx = idx
		}

		if sum < 0 {
			minusPos = idx
			sum = 0
		}
	}

	restSum := 0
	for i:= 0; i < leftIdx; i++ {
		restSum += numbers[i]
	}

	for i:= rightIdx + 1; i < len(numbers); i++ {
		restSum += numbers[i]
	}

	fmt.Println(maxSum + restSum)
}


package main

import "fmt"

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

func main() {
	n := 0
	fmt.Scan(&n)
	as := make([]int, n)
	for i := range as {
		fmt.Scan(&as[i])
	}
	i := 0
	lenas := len(as)
	seqglobal := 0
	seqlocal := 0
	for i < lenas {
		// consume left 1s bound
		for i < lenas && as[i] == 1 {
			i++
			seqlocal++
		}
		// consume middle 0s
		for i < lenas && as[i] == 0 {
			i++
			seqlocal++
		}
		isave := i
		// consume right 1s bound
		for i < lenas && as[i] == 1 {
			i++
			seqlocal++
		}
		seqglobal = max(seqglobal, seqlocal)
		seqlocal = i - isave
	}
	fmt.Println(seqglobal)
}


package main

import "fmt"

func Count(left, right int, a []int) (cnt int) {
  for i, val := range a {
    if left <= i && i <= right {
      cnt += 1 - val
    } else {
      cnt += val
    }
  }
  return
}

func main() {
  var n int
  fmt.Scanln("%d", &n)
  var a = make([]int, n)
  for i := range a {
    fmt.Scanf("%d", &a[i])
  }
  best := 0
  for i := 0; i < n; i++ {
    for j := i; j < n; j++ {
      cnt := Count(i,j,a)
      if best < cnt {
        best = cnt
      }
    }
  }
  fmt.Println(best)
}


package main

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

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

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

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

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

func main() {
	defer w.Flush()
	var n, m, a, b int
	for I(&n, &m, &a, &b) == nil {
		solve(n, m, a, b)
	}
}

func solve(n, m, a, b int) {
	min := (n/m)*b + (n%m)*a
	if min > n*a {
		min = n * a
	}
	O(min, "\n")
}


package main

import (
    "fmt"
)

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

func main(){
    var n, m, a, b int
    fmt.Scan(&n, &m, &a, &b)
    fmt.Println(min(n*a, ((n/m)*b + (n%m)*a)))
}


package main
import "fmt"

func main() {
	var (
		n, m, a, b int
		per float32
	)
	fmt.Scanln(&n, &m, &a, &b)
	per = float32(b/m)
	if per >= float32(b) {
		fmt.Println(n*a)
	}else {
		if n%m == 0 {
			fmt.Println(n/m*b)
		}else{
			remain := n%m
			if remain*a >= b {
				fmt.Println((n/m+1)*b)
			}else {
				fmt.Println((n%m)*a + (n/m)*b)
			}
		}
	}
}


package main

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

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

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

	n, m, a, b := nextInt(), nextInt(), nextInt(), nextInt()

	cost1 := a * n
	cost2 := (n / m) * b + (n % m) * a

	if cost1 >= cost2 {
		println(cost2)
	} else {
		println(cost1)
	}

}

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

func nextInt() int {
	n, err := strconv.Atoi(next())
	if err != nil {
		panic(err)
	}
	return n
}

func nextFloat() float64 {
	n, err := strconv.ParseFloat(next(), 64)
	if err != nil {
		panic(err)
	}
	return n
}

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

func print(a ...interface{}) {
	fmt.Fprint(writer, a...)
}

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


package main

import "fmt"

func main() {
	var n, m, a, b int
	fmt.Scanf("%d %d %d %d", &n, &m, &a, &b)
	sum := n / m * b
	if (n % m) * a > b {
		sum += b
	}else {
		sum += (n % m) * a
	}
	fmt.Printf("%d", sum)

}


package main

import "fmt"

func main() {
    var n, m, a, b int
    fmt.Scanf("%d %d %d %d", &n, &m, &a, &b)
    var x = n * a
    var y = (n / m) * b + (n % m) * a
    if x < y {
        fmt.Printf("%d\n", x)
    } else {
        fmt.Printf("%d\n", y)
    }
}


package main

import (
	"fmt"

)
//a - цена
//n - поездки
//m - аб - колво
//b - аб цена
func main() {
	//input
	n, m, a, b := 10, 3, 5, 1
	fmt.Scanf("%d %d %d %d", &n, &m, &a, &b)
	//output
	fmt.Print(solution(n, m, a ,b))
}
func solution(n, m, a, b int) int {
	avgA := float64(b) / float64(m)

	if (float64(a) <= avgA) {
		return n * a
	}
	r := (n / m) * b
	if ost := n % m; ost > 0 {
		if (r + a) > (r + b) { r+= b} else {r += (a * ost)}
	}
	return r
}


package main

import (
	"fmt"

)

//n - поездки
//m - аб - колво
//a - цена
//b - аб цена
func main() {
	//input
	n, m, a, b := 101, 110, 1, 100
	fmt.Scanf("%d %d %d %d", &n, &m, &a, &b)
	//output
	fmt.Print(solution(n, m, a ,b))
}
func solution(n, m, a, b int) int {

	avg := float64(b) / float64(m)
	r := (n / m) * b

	switch {
	case m > n && b < n * a:
		return b
	case float64(a) <= avg:
		return n * a
	case n % m > 0 && a > b:
		return r + b
	case n % m > 0 && a < b:
		return r + (a * (n % m))
	default:
		return r
	}

}

/**
avgA := float64(b) / float64(m)
	if m > n && b < n * a { return b }
	if (float64(a) <= avgA) { return n * a }
	r := (n / m) * b
	if mod := n % m; mod > 0 {
		if a > b { r+= b} else {r += (a * mod)}
	}
	return r
 */


package main

import "fmt"

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

	if b/m > a {
		fmt.Print(a * n)
	} else {
		fmt.Print(b*(n/m) + a*(n%m))
	}
}


package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	all := scanner.Text()
	var chList []int
	for _, ch := range strings.Split(all, " ") {
		ch, err := strconv.Atoi(ch)
		if err != nil {
			log.Fatal(err)
		}
		chList = append(chList, ch)
	}
	n, m, a, b := chList[0], chList[1], chList[2], chList[3]
	money := 0
	if (b / m) < a {
		if (n%m)*a < b {
			money = (n%m)*a + n/m*b
		} else {
			money = n/m*b + 1
		}
	} else {
		money = n * a
	}
	fmt.Println(money)
}


package main

import "fmt"

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

    cnt := 0
    ref := uint64(0)
    for bits := 1; ref <= b; bits++ {
        ref = ref*2 + 1
        for i := 1; i < bits; i++ {
            ref2 := ref - 1<<uint(i)
            if ref2 >= a && ref2 <= b {
                cnt++
            }
        }
    }
    fmt.Println(cnt)
}


package main

import (
	"fmt"
	"strconv"
)

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

	as, ac, ai := to_binary_string(a)
	bs, bc, bi := to_binary_string(b)

	var c [3]int

	if len(as) < len(bs) {
		if ac == 0 {
			c[0] = 0
		} else {
			c[0] = len(as) - ai
		}
		for i := len(as) + 1; i <= len(bs)-1; i++ {
			c[1] += i - 1
		}
		if bc == 0 {
			c[2] = len(bs) - 1
		} else {
			c[2] = bi - 1
			if bc == 1 {
				c[2] += 1
			}
		}
	} else if len(as) == len(bs) {
		if ai == bi-1 {
			c[1] = 1
		} else if ai > bi-1 {
			if ac == 1 || bc == 1 {
				c[1] = 1
			}
		} else {
			c[1] = bi - ai
		}
	}

	fmt.Println(c[0] + c[1] + c[2])
}

func to_binary_string(n int64) (string, int, int) {
	out := ""
	zero_count := 0
	first_zero_index := -1
	for i := 0; n > 0; i++ {
		if n%2 == 0 {
			zero_count++
			first_zero_index = i
		}
		out = strconv.FormatInt(n%2, 10) + out
		n /= 2
	}
	return out, zero_count, len(out) - first_zero_index - 1
}


// Try Codeforces
// author: Leonardone @ NEETSDKASU
package main

import "fmt"

func main() {
	var m, b int64
	fmt.Scan(&m, &b)
	x := m * b / 2
	y := (-x + m*b) / m
	s1 := (y + 1) * x * (x + 1) / 2
	s2 := (x + 1) * y * (y + 1) / 2
	fmt.Println(s1 + s2)
}


package main

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

func calc(x, n int64) int64 {
	sum := int64(0)

	for i := x; i >= 0; i-- {
		sum += n*(n-1)/2 + n*i
	}
	return sum
}

func main() {
	sc := NewScanner()
	M, B := sc.NextInt64(), sc.NextInt64()

	mx := int64(0)
	for x := M*B/2 - 1; x <= M*B/2+1; x++ {
		if x < 0 {
			continue
		}

		y := -((x - B*M) / M)

		if y < 0 {
			continue
		}
		n := y + 1
		q := calc(x, n)
		if mx < q {
			mx = q
		}
	}
	fmt.Println(mx)

}

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 sum(k, num int64) int64 {
	return num * ((k-1)+(k - num))/2 + 1
}

func run(n, k int64) {
	var i, j, mid int64
	i, j = 1, k-1
	mid = (i + j) >> 1
	if sum(k, j) < n {
		fmt.Println(-1)
		return
	}
	for i < j {
		if sum(n, mid) > n {
			j = mid - 1
		} else {
			i = mid + 1
		}
		mid = (i + j) >> 1
	}
	fmt.Println(mid)
}

func main() {
	var n, k int64
	for _, err := fmt.Scanf("%d %d", &n, &k); err == nil; _, err = fmt.Scanf("%d %d", &n, &k) {
		run(n, k)
	}
}


package main

import (
	"fmt"
)

func sum(k, num int64) int64 {
	return num * ((k-1)+(k - num))/2 + 1
}

func run(n, k int64) {
	var i, j, mid int64
	i, j = 1, k-1
	mid = (i + j) >> 1
	if sum(k, j) < n {
		fmt.Println(-1)
		return
	}
	for i < j {
		s := sum(k, mid)
		if s >= n {
			j = mid
		} else {
			i = mid + 1
		}
		mid = (i + j) >> 1
	}
	fmt.Println(mid)
}

func main() {
	var n, k int64
	for _, err := fmt.Scanf("%d %d", &n, &k); err == nil; _, err = fmt.Scanf("%d %d", &n, &k) {
		run(n, k)
	}
}


package main
import (
	"fmt"
)

func main() {
	var a,b,c,d,e,f int
	fmt.Scan(&a,&b,&c)
	d=(a+b-c)/2
	e=(b+c-a)/2
	f=(a+c-b)/2
	if ((a+b+c)%2!=0) || ((a+b)<c) || ((b+c)<a) || ((a+c)<b) || (a==b && a==c && b==c) {
		fmt.Println("Impossible")
	} else {
		fmt.Println(d,e,f)
	}
}


package main

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

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

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

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

func pcheck(i bool) {
	if i {
		printf("YES\n")
	} else {
		printf("NO\n")
	}
}

var debug = true

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

func main() {
	defer writer.Flush()

	var a, b, c int
	scanf("%d %d %d\n", &a, &b, &c)
	b /= 2
	c /= 4
	if a > b {
		a = b
	}
	if a > c {
		a = c
	}
	printf("%d\n", 7*a)
}


package main

import “fmt”

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

func main() {
    var a, b, c int
    fmt.Scan(&a, &b, &c)
    b /= 2
    c /= 4
    r := min(a, b)
    r = min(r, c)
    fmt.Print(r*7)
}


package main

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

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

	var n int
	fmt.Fscan(r, &n)
	fmt.Fprintln(w, 2*n + 1)
}


package main

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

const cf = false

func solve() {
	var n int
	fmt.Fscan(in, &n)
	if n == 1 {
		fmt.Fprintln(out, 3)
	} else {
		fmt.Fprintln(out, 4+int(math.Floor((4.*float64(n)-3.)/3.)))
	}
}

func main() {
	defer out.Flush()
	t := 1
	//fmt.Fscan(in, &t)
	for ; t > 0; t-- {
		solve()
	}
}

func ConvertInt(val string, base, toBase int) (string, error) {
	i, err := strconv.ParseInt(val, base, 64)
	if err != nil {
		return "", err
	}
	return strconv.FormatInt(i, toBase), nil
}

type set[T Ordered] struct {
	itms map[T]struct{}
}

func (s *set[T]) init() {
	if s.itms == nil {
		s.itms = make(map[T]struct{})
	}
}

func (s *set[T]) add(item T) *set[T] {
	s.init()
	s.itms[item] = exists
	return s
}

func (s *set[T]) remove(item T) *set[T] {
	s.init()
	delete(s.itms, item)
	return s
}

func (s *set[T]) has(item T) bool {
	s.init()
	_, c := s.itms[item]
	return c
}

func (s *set[T]) sortedItems() []T {
	s.init()
	items := make([]T, 0, s.size())
	for item := range s.itms {
		items = append(items, item)
	}
	sort.Slice(items, func(i, j int) bool {
		return items[i] < items[j]
	})
	return items
}

func (s *set[T]) items() []T {
	s.init()
	items := make([]T, 0, s.size())
	for item := range s.itms {
		items = append(items, item)
	}
	return items
}

func (s *set[T]) size() int {
	s.init()
	return len(s.itms)
}

var exists = struct{}{}

const MaxUint = ^uint(0)
const MinUint = 0
const MaxInt = int(MaxUint >> 1)
const MinInt = -MaxInt - 1

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

type Float interface {
	~float32 | ~float64
}

type Integer interface {
	Signed | Unsigned
}

type Signed interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64
}

type Unsigned interface {
	~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr
}

type Ordered interface {
	Integer | Float | ~string
}

func abs[T Signed](x T) T {
	if x < 0 {
		return -x
	}
	return x
}

func min[T Ordered](x, y T) T {
	if x < y {
		return x
	}
	return y
}

func max[T Ordered](x, y T) T {
	if x > y {
		return x
	}
	return y
}

var (
	in  = getReader()
	out = getWriter()
)

func getReader() *bufio.Reader {
	if cf {
		return bufio.NewReader(os.Stdin)
	} else {
		in, _ := os.Open("input.txt")
		return bufio.NewReader(in)
	}
}

func getWriter() *bufio.Writer {
	if cf {
		return bufio.NewWriter(os.Stdout)
	} else {
		out, _ := os.Create("output.txt")
		return bufio.NewWriter(out)
	}
}