Imagine a city with n horizontal streets crossing m vertical streets, forming an (n - 1) × (m - 1) grid. In order to increase the traffic flow, mayor of the city has decided to make each street one way. This means in each horizontal street, the traffic moves only from west to east or only from east to west. Also, traffic moves only from north to south or only from south to north in each vertical street. It is possible to enter a horizontal street from a vertical street, or vice versa, at their intersection.  The mayor has received some street direction patterns. Your task is to check whether it is possible to reach any junction from any other junction in the proposed street direction pattern.

The first line of input contains two integers n and m, (2 ≤ n, m ≤ 20), denoting the number of horizontal streets and the number of vertical streets. The second line contains a string of length n, made of characters '<' and '>', denoting direction of each horizontal street. If the i-th character is equal to '<', the street is directed from east to west otherwise, the street is directed from west to east. Streets are listed in order from north to south. The third line contains a string of length m, made of characters '^' and 'v', denoting direction of each vertical street. If the i-th character is equal to '^', the street is directed from south to north, otherwise the street is directed from north to south. Streets are listed in order from west to east.

If the given pattern meets the mayor's criteria, print a single line containing "YES", otherwise print a single line containing "NO".

NoteThe figure above shows street directions in the second sample test case.

package main

import (
	"fmt"
)

type Vertex struct {
	neighbors []*Vertex
}

func main() {
	var n, m int
	fmt.Scanf("%d %d\n", &n, &m)
	g1 := make([][]*Vertex, n)
	g2 := make([][]*Vertex, n)
	for i := range g1 {
		g1[i] = make([]*Vertex, m)
		g2[i] = make([]*Vertex, m)
		for j := range g1[i] {
			g1[i][j] = &Vertex{neighbors: make([]*Vertex, 2)}
			g2[i][j] = &Vertex{neighbors: make([]*Vertex, 2)}
		}
	}
	var horizon, vertical string
	fmt.Scanf("%s\n", &horizon)
	fmt.Scanf("%s\n", &vertical)
	for i, c := range horizon {
		if c == '>' {
			for j := 0; j < m-1; j++ {
				g1[i][j].neighbors[0] = g1[i][j+1]
			}
			for j := 1; j < m; j++ {
				g2[i][j].neighbors[0] = g2[i][j-1]
			}
		} else {
			for j := 1; j < m; j++ {
				g1[i][j].neighbors[0] = g1[i][j-1]
			}
			for j := 0; j < m-1; j++ {
				g2[i][j].neighbors[0] = g2[i][j+1]
			}
		}
	}
	for j, c := range vertical {
		if c == 'v' {
			for i := 0; i < n-1; i++ {
				g1[i][j].neighbors[1] = g1[i+1][j]
			}
			for i := 1; i < n; i++ {
				g2[i][j].neighbors[1] = g2[i-1][j]
			}
		} else {
			for i := 1; i < n; i++ {
				g1[i][j].neighbors[1] = g1[i-1][j]
			}
			for i := 0; i < n-1; i++ {
				g2[i][j].neighbors[1] = g2[i+1][j]
			}

		}
	}
	if dfs(g1) && dfs(g2) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

func dfs(g [][]*Vertex) bool {
	visited := make(map[*Vertex]struct{})
	v := g[0][0]
	dfsRecurse(v, visited)
	return len(visited) == len(g) * len(g[0])

}

func dfsRecurse(v *Vertex, visited map[*Vertex]struct{}) {
	visited[v] = struct{}{}
	for _, n := range v.neighbors {
		if n == nil {
			continue
		}
		if _, ok := visited[n]; !ok {
			dfsRecurse(n, visited)
		}
	}
}

package main

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

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

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

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

var (
    n, m, count int
    row, col    string
    visited     []bool
)

func dfs(i, j int) {
    index := i*m + j
    if i < 0 || j < 0 || i >= n || j >= m || visited[index] {
        return
    }

    visited[index] = true

    if row[i] == '>' {
        dfs(i, j+1)
    } else {
        dfs(i, j-1)
    }

    if col[j] == 'v' {
        dfs(i+1, j)
    } else {
        dfs(i-1, j)
    }
}

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

    n = ReadInt32()
    m = ReadInt32()
    row = ReadString()
    col = ReadString()
    count = n * m
    f := true

    for i := 0; (i < n) && (f); i++ {
        for j := 0; (j < m) && (f); j++ {
            visited = make([]bool, count)
            dfs(i, j)
            for k := 0; (k < count) && (f); k++ {
                f = visited[k]
            }
        }
    }

    if f {
        writer.WriteString("YES\n")
    } else {
        writer.WriteString("NO\n")
    }
}

package main

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

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

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

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

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

    n := ReadInt32()
    m := ReadInt32()
    s1 := ReadString()
    s2 := ReadString()
    count := n * m
    a := make([][]int, count)
    for i := 0; i < count; i++ {
        a[i] = make([]int, count)
        a[i][i] = 1
    }

    for i := 0; i < m; i++ {
        if s2[i] == 'v' {
            for j := 0; j < n-1; j++ {
                for k := j + 1; k < n; k++ {
                    a[j*m+i][k*m+i] = 1
                }
            }
        } else {
            for j := n - 1; j > 0; j-- {
                for k := j - 1; k >= 0; k-- {
                    a[j*m+i][k*m+i] = 1
                }
            }
        }
    }

    for i := 0; i < n; i++ {
        if s1[i] == '>' {
            for j := 0; j < m-1; j++ {
                for k := j + 1; k < m; k++ {
                    a[i*m+j][i*m+k] = 1
                }
            }
        } else {
            for j := m - 1; j > 0; j-- {
                for k := j - 1; k >= 0; k-- {
                    a[i*m+j][i*m+k] = 1
                }
            }
        }
    }

    for k := 0; k < count; k++ {
        for i := 0; i < count; i++ {
            for j := 0; j < count; j++ {
                if a[i][k] == 1 && a[k][j] == 1 {
                    a[i][j] = 1
                }
            }
        }
    }

    f := true

    for i := 0; (i < count) && (f); i++ {
        for j := 0; (j < count) && (f); j++ {
            f = a[i][j] != 0
        }
    }

    if f {
        writer.WriteString("YES\n")
    } else {
        writer.WriteString("NO\n")
    }
}

package main

import (
	"fmt"
)

func main() {
	var n, m int
	fmt.Scan(&n)
	fmt.Scan(&m)
	var rows, cols string
	fmt.Scan(&rows)
	fmt.Scan(&cols)
	var tl, tr, bl, br bool

	for i := 0; i < n; i++ {
		var direction = rows[i]
		if i == 0 {
			switch direction {
			case '>':
				tr = true
			case '<':
				tl = true
			}
		}
		if i == n-1 {
			switch direction {
			case '>':
				br = true
			case '<':
				bl = true
			}
		}
	}

	for i := 0; i < m; i++ {
		var direction = cols[i]
		if i == 0 {
			switch direction {
			case 'v':
				bl = true
			case '^':
				tl = true
			}
		}
		if i == m-1 {
			switch direction {
			case 'v':
				br = true
			case '^':
				tr = true
			}
		}
	}
	if tl && tr && bl && br {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import (
	"fmt"
)

type Vertex struct {
	neighbors []*Vertex
}

func main() {
	var n, m int
	fmt.Scanf("%d %d", &n, &m)
	g1 := make([][]*Vertex, n)
	g2 := make([][]*Vertex, n)
	for i := range g1 {
		g1[i] = make([]*Vertex, m)
		g2[i] = make([]*Vertex, m)
		for j := range g1[i] {
			g1[i][j] = &Vertex{neighbors: make([]*Vertex, 2)}
			g2[i][j] = &Vertex{neighbors: make([]*Vertex, 2)}
		}
	}

	var horizon, vertical string
	fmt.Scanf("%s %s", &horizon, &vertical)
	for i, c := range horizon {
		if c == '>' {
			for j := 0; j < m-1; j++ {
				g1[i][j].neighbors[0] = g1[i][j+1]
			}
			for j := 1; j < m; j++ {
				g2[i][j].neighbors[0] = g2[i][j-1]
			}
		} else {
			for j := 1; j < m; j++ {
				g1[i][j].neighbors[0] = g1[i][j-1]
			}
			for j := 0; j < m-1; j++ {
				g2[i][j].neighbors[0] = g2[i][j+1]
			}
		}
	}
	for j, c := range vertical {
		if c == 'v' {
			for i := 0; i < n-1; i++ {
				g1[i][j].neighbors[1] = g1[i+1][j]
			}
			for i := 1; i < n; i++ {
				g2[i][j].neighbors[1] = g2[i-1][j]
			}
		} else {
			for i := 1; i < n; i++ {
				g1[i][j].neighbors[1] = g1[i-1][j]
			}
			for i := 0; i < n-1; i++ {
				g2[i][j].neighbors[1] = g2[i+1][j]
			}

		}
	}
	if dfs(g1) && dfs(g2) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

func dfs(g [][]*Vertex) bool {
	visited := make(map[*Vertex]struct{})
	v := g[0][0]
	dfsRecurse(v, visited)
	return len(visited) == len(g) * len(g[0])

}

func dfsRecurse(v *Vertex, visited map[*Vertex]struct{}) {
	visited[v] = struct{}{}
	for _, n := range v.neighbors {
		if n == nil {
			continue
		}
		if _, ok := visited[n]; !ok {
			dfsRecurse(n, visited)
		}
	}
}


Your security guard friend recently got a new job at a new security company. The company requires him to patrol an area of the city encompassing exactly N city blocks, but they let him choose which blocks. That is, your friend must walk the perimeter of a region whose area is exactly N blocks. Your friend is quite lazy and would like your help to find the shortest possible route that meets the requirements. The city is laid out in a square grid pattern, and is large enough that for the sake of the problem it can be considered infinite.

Input will consist of a single integer N (1 ≤ N ≤ 106), the number of city blocks that must be enclosed by the route.

Print the minimum perimeter that can be achieved.

NoteHere are some possible shapes for the examples:

package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	for i := 1; ; i++ {
		if i*i >= n {
			fmt.Println(4 * i)
			return
		}
		if i*(i+1) >= n {
			fmt.Println(4*i + 2)
			return
		}
	}
}

package main

import (
        "fmt"
        "math"
)

var n int

func main() {
        fmt.Scan(&n)
        sqt := math.Sqrt(float64(n))
        hight := int(sqt)
        width := 0
        if hight*hight == n {
                width = hight
        } else {
                width = hight + 1
                if hight*width < n {
                        hight += 1
                }
        }
        fmt.Println(hight*2 + width*2)
}

package main

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

func roundUp(x float64) int {
	return int(math.Floor(x + 1))
}

func main() {
	var n int
	fmt.Scanf("%d\n", &n)
	if sqrt := math.Sqrt(float64(n)); int(sqrt)*int(sqrt) == n {
		fmt.Println(int(sqrt) * 4)
		os.Exit(0)
	} else {
		x := roundUp(sqrt)
		y := x
		for {
			if x*y == n {
				break
			} else if x*y < n {
				x++
				break
			}
			x--
		}
		fmt.Println(x*2 + y*2)
		os.Exit(0)
	}
}

package main

import "fmt"

var (
    n, a, b int
)

func main() {
    fmt.Scan(&n)
    a , b = 1, 1
    for a * b < n {
        a++
        if a > b {
            a, b = b, a
        }
    }
    fmt.Println(2*(a+b))
}


Recently Adaltik discovered japanese crosswords. Japanese crossword is a picture, represented as a table sized a × b squares, and each square is colored white or black. There are integers to the left of the rows and to the top of the columns, encrypting the corresponding row or column. The number of integers represents how many groups of black squares there are in corresponding row or column, and the integers themselves represents the number of consecutive black squares in corresponding group (you can find more detailed explanation in Wikipedia https://en.wikipedia.org/wiki/Japanese_crossword).Adaltik decided that the general case of japanese crossword is too complicated and drew a row consisting of n squares (e.g. japanese crossword sized 1 × n), which he wants to encrypt in the same way as in japanese crossword.    The example of encrypting of a single row of japanese crossword. Help Adaltik find the numbers encrypting the row he drew.

NoteThe last sample case correspond to the picture in the statement.

package main

import (
    "fmt"
    "regexp"
    "strings"
)

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

    var str string
    fmt.Scanln(&str)
    re := regexp.MustCompile("(W)*")
	str = re.ReplaceAllString(str, "$1")

	blocks := strings.Split(str, "W")
    if len(blocks) > 0 {
        if len(blocks[0]) == 0 {
            blocks = append(blocks[1:])
        }
        if len(blocks[len(blocks) - 1]) == 0 {
            blocks = append(blocks[:len(blocks)-1])
        }
    }
    fmt.Println(len(blocks))
    for _, block := range blocks {
        fmt.Printf("%v ", len(block))
    }
}

// A. One-dimensional Japanese Crossword
/*
Recently Adaltik discovered japanese crosswords. Japanese crossword is a picture, represented as a table sized a × b squares, and each square is colored white or black. There are integers to the left of the rows and to the top of the columns, encrypting the corresponding row or column. The number of integers represents how many groups of black squares there are in corresponding row or column, and the integers themselves represents the number of consecutive black squares in corresponding group (you can find more detailed explanation in Wikipedia https://en.wikipedia.org/wiki/Japanese_crossword).

Adaltik decided that the general case of japanese crossword is too complicated and drew a row consisting of n squares (e.g. japanese crossword sized 1 × n), which he wants to encrypt in the same way as in japanese crossword.

Help Adaltik find the numbers encrypting the row he drew.

Input
The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the length of the row. The second line of the input contains a single string consisting of n characters 'B' or 'W', ('B' corresponds to black square, 'W' — to white square in the row that Adaltik drew).

Output
The first line should contain a single integer k — the number of integers encrypting the row, e.g. the number of groups of black squares in the row.

The second line should contain k integers, encrypting the row, e.g. corresponding to sizes of groups of consecutive black squares in the order from left to right.
Examples

Input
3
BBW

Output
1
2

Input
5
BWBWB

Output
3
1 1 1

Input
4
WWWW

Output
0

Input
4
BBBB

Output
1
4

Input
13
WBBBBWWBWBBBW

Output
3
4 1 3

Note
The last sample case correspond to the picture in the statement.
*/
package main

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

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

	input2, _ := reader.ReadString('\n')
	a := strings.TrimSpace(input2)

	k, g := 0, 0
	arrK := []int{}
	for i := 0; i < n; i++ {
		if a[i] == 'B' {
			k++
		} else if k > 0 {
			g++
			arrK = append(arrK, k)
			k = 0
		}
	}

	if k > 0 {
		g++
		arrK = append(arrK, k)
		k = 0
	}

	fmt.Println(g)

	for _, v := range arrK {
		fmt.Printf("%v ", v)
	}
}

package main

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

var bufin *bufio.Reader
var bufout *bufio.Writer

func main() {
	bufin = bufio.NewReader(os.Stdin)
	bufout = bufio.NewWriter(os.Stdout)
	defer bufout.Flush()

	var n int
	var s string

	fmt.Fscanf(bufin, "%d\n", &n)
	fmt.Fscanf(bufin, "%s\n", &s)

	var res []int
	for i := 0; i < n; i++ {
		if s[i] == 'B' {
			j := i
			for (j < n) && (s[j] == 'B') {
				j++
			}
			res = append(res, j-i)
			i = j - 1
		}
	}

	fmt.Fprintf(bufout, "%d\n", len(res))
	for _, v := range res {
		fmt.Fprintf(bufout, "%d ", v)
	}
}

package main

import "fmt"

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

	seq := []int{}
	for i, v := range s {
		if v == 'B' {
			if i == 0 || s[i-1] == 'W' {
				seq = append(seq, 0)
			}
			seq[len(seq)-1]++
		}
	}

	fmt.Println(len(seq))
	if len(seq) == 0 {
		return
	}
	for i, v := range seq {
		if i != 0 {
			fmt.Print(" ")
		}
		fmt.Print(v)
	}
	fmt.Println()
}

// http://acm.timus.ru/problem.aspx?space=1&num=1741
package main

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

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

const MOD = 1e9 + 7

func main () {
	var n int
	var str string

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

	fmt.Fscanln(input, &n)
	fmt.Fscanln(input, &str)

	cnt := 0
	ans := make([]int, 0)
	for i := 0; i < len(str); i++ {
		if str[i] == 'W' {
			if cnt > 0 {
				ans = append(ans, cnt)
				cnt = 0
			}
		} else {
			cnt++
		}
	}

	if cnt > 0 {
		ans = append(ans, cnt)
	}

	fmt.Println(len(ans))
	for i := 0; i < len(ans); i++ {
		if i != 0 {
			fmt.Print(" ", ans[i])
		} else {
			fmt.Print(ans[i])
		}
	}
}

package main

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

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

	codes := []string{}
	b := 0
	for _, c := range strings.TrimSpace(cs) {
		if c == 'B' {
			b++
		} else {
			if b > 0 {
				codes = append(codes, fmt.Sprintf("%d", b))
				b = 0
			}
		}
	}
	if b > 0 {
		codes = append(codes, fmt.Sprintf("%d", b))
	}

	if len(codes) > 0 {
		fmt.Fprintln(os.Stdout, len(codes))
		fmt.Fprintln(os.Stdout, strings.Join(codes, " "))
	} else {
		fmt.Fprintln(os.Stdout, 0)
	}

}

package main

import (
	"fmt"
)

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

	var counter int
	var answer []int
	for i := 0; i <= n; i++ {
		if (i == n || (i != 0 && str[i-1] != str[i])) && counter != 0 {
			answer = append(answer, counter)
			counter = 0
		}
		if i < n && str[i] == 'B' {
			counter++
		}
	}

	fmt.Println(len(answer))
	for _, a := range answer {
		fmt.Printf("%d ", a)
	}
	fmt.Println()
}

package main

import "fmt"

func main() {
    var n int
    fmt.Scan(&n)
    groups := make([]int, n)
    var s string
    fmt.Scan(&s)
    s += "W"
    var lastRune rune = 'W'
    var groupCnt int
    var curGroup int
    for _, r := range s {
        if r == 'B' {
            curGroup++
            if lastRune == 'W' {
                groupCnt++
            }
            lastRune = 'B'
        } else if r == 'W' {
            if lastRune == 'B' {
                groups[groupCnt-1] = curGroup
            }
            lastRune = 'W'
            curGroup = 0
        }
    }
    fmt.Print(groupCnt, "\n")
    for i:=0; i < groupCnt; i++ {
        fmt.Print(groups[i], " ")
    }
}

package main

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

func main() {
	fsc := NewFastScanner()
	N := fsc.NextInt()
	_ = N
	str := fsc.Next()
	var ans []int
	var res int

	for i := 0; i < len(str); i++ {
		if str[i] == 'B' {
			res++
		} else {
			if res > 0 {
				ans = append(ans, res)
			}
			res = 0
		}
	}
	if res > 0 {
		ans = append(ans, res)
	}
	fmt.Println(len(ans))
	for i := 0; i < len(ans); i++ {
		fmt.Print(ans[i], " ")
	}
}

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

func NewFastScanner() *FastScanner {
	rdr := bufio.NewReaderSize(os.Stdin, 2028)
	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) NextInt() int {
	val, err := strconv.Atoi(s.Next())
	if err != nil {
		panic(err)
	}
	return val
}
func (s *FastScanner) NextInt64() int64 {
	val, err := strconv.ParseInt(s.Next(), 10, 64)
	if err != nil {
		panic(err)
	}
	return val
}
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, err := s.r.ReadLine()
		if err != nil {
			panic(err.Error())
		}
		s.buf = append(s.buf, l...)
		if !p {
			break
		}
	}
}

package main

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

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

	codes := []string{}
	b := 0
	for _, c := range strings.TrimSpace(cs) {
		if c == 'B' {
			b++
		} else {
			if b > 0 {
				codes = append(codes, fmt.Sprintf("%d", b))
				b = 0
			}
		}
	}
	if b > 0 {
		codes = append(codes, fmt.Sprintf("%d", b))
	}

	if len(codes) > 0 {
		fmt.Println(strings.Join(codes, " "))
	} else {
		fmt.Println(0)
	}

}

package main

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

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

	codes := []string{}
	b := 0
	for _, c := range strings.TrimSpace(cs) {
		if c == 'B' {
			b++
		} else {
			if b > 0 {
				codes = append(codes, fmt.Sprintf("%d", b))
				b = 0
			}
		}
	}
	if b > 0 {
		codes = append(codes, fmt.Sprintf("%d", b))
	}

	if len(codes) > 0 {
		fmt.Fprintln(os.Stdout, strings.Join(codes, " "))
	} else {
		fmt.Fprintln(os.Stdout, 0)
	}

}

package main

import (
	"fmt"
)

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

	var counter int
	for i := 0; i <= n; i++ {
		if (i == n || (i != 0 && str[i-1] != str[i])) && counter != 0 {
			fmt.Printf("%d ", counter)
			counter = 0
		}
		if i < n && str[i] == 'B' {
			counter++
		}
	}
	fmt.Println()
}

package main

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

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

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

func PrintInts(ints ...int) {
	for _, value := range ints {
		writer.WriteString(strconv.Itoa(value))
		writer.WriteByte(' ')
	}
}

func main() {
	//fmt.Scanf("%d%d",&n, &k)
	scanner.Split(bufio.ScanWords)
	var row string
	var length, index int
	var arr [100]int
	_ = ReadInt32()
	fmt.Scanf("%s", &row)
	for i := 0; i < len(row); i++ {
		if row[i] == 'B' {
			length++
		} else if row[i] != 'B' && length > 0 {
			arr[index] = length
			index++
			length = 0
		}
	}
	if length != 0 {
		arr[index] = length
		index++
	}
	fmt.Printf("%d", index)
	if index > 0 {
		fmt.Printf("\n%d", arr[0])
	}
	for i := 1; i < index; i++ {
		fmt.Printf(" %d", arr[i])
	}
	fmt.Printf("\n")
}

package main

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

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

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

func PrintInts(ints ...int) {
	for _, value := range ints {
		writer.WriteString(strconv.Itoa(value))
		writer.WriteByte(' ')
	}
}

func main() {
	//fmt.Scanf("%d%d",&n, &k)
	scanner.Split(bufio.ScanWords)
	var row string
	var length, index int
	var arr [100]int
	_ = ReadInt32()
	fmt.Scanf("%s", &row)
	for i := 0; i < len(row); i++ {
		if row[i] == 'B' {
			length++
		} else if row[i] != 'B' && length > 0 {
			arr[index] = length
			index++
			length = 0
		}
	}
	if length != 0 {
		arr[index] = length
		index++
	}
	fmt.Println(index)
	for i := 0; i < index; i++ {
		fmt.Println(arr[i], " ")
	}
}

package main

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

func main() {
	fsc := NewFastScanner()
	N := fsc.NextInt()
	_ = N
	str := fsc.Next()
	var ans []int
	var res int

	for i := 0; i < len(str); i++ {
		if str[i] == 'B' {
			res++
		} else {
			if res > 0 {
				ans = append(ans, res)
			}
			res = 0
		}
	}
	fmt.Println(len(ans))
	for i := 0; i < len(ans); i++ {
		fmt.Print(ans[i], " ")
	}
}

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

func NewFastScanner() *FastScanner {
	rdr := bufio.NewReaderSize(os.Stdin, 2028)
	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) NextInt() int {
	val, err := strconv.Atoi(s.Next())
	if err != nil {
		panic(err)
	}
	return val
}
func (s *FastScanner) NextInt64() int64 {
	val, err := strconv.ParseInt(s.Next(), 10, 64)
	if err != nil {
		panic(err)
	}
	return val
}
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, err := s.r.ReadLine()
		if err != nil {
			panic(err.Error())
		}
		s.buf = append(s.buf, l...)
		if !p {
			break
		}
	}
}


Little Petya has recently started attending a programming club. Naturally he is facing the problem of choosing a programming language. After long considerations he realized that Java is the best choice. The main argument in favor of choosing Java was that it has a very large integer data type, called BigInteger.But having attended several classes of the club, Petya realized that not all tasks require using the BigInteger type. It turned out that in some tasks it is much easier to use small data types. That's why a question arises: "Which integer type to use if one wants to store a positive integer n?"Petya knows only 5 integer types:1) byte occupies 1 byte and allows you to store numbers from  - 128 to 1272) short occupies 2 bytes and allows you to store numbers from  - 32768 to 327673) int occupies 4 bytes and allows you to store numbers from  - 2147483648 to 21474836474) long occupies 8 bytes and allows you to store numbers from  - 9223372036854775808 to 92233720368547758075) BigInteger can store any integer number, but at that it is not a primitive type, and operations with it are much slower.For all the types given above the boundary values are included in the value range.From this list, Petya wants to choose the smallest type that can store a positive integer n. Since BigInteger works much slower, Peter regards it last. Help him.

The first line contains a positive number n. It consists of no more than 100 digits and doesn't contain any leading zeros. The number n can't be represented as an empty string. Please, do not use %lld specificator to read or write 64-bit integers in C++. It is preffered to use cout (also you may use %I64d).

Print the first type from the list "byte, short, int, long, BigInteger", that can store the natural number n, in accordance with the data given above.

package main

import "os"
import "bufio"
//import "strconv"

func main(){
	var n string
	r := bufio.NewScanner(os.Stdin)
	r.Split(bufio.ScanWords)
	w := bufio.NewWriter(os.Stdout)
	r.Scan()
	n = r.Text()
	l := len(n)
	if l < 3 || (l == 3 && n < "128") {
		w.WriteString("byte")
	} else if l < 5 || (l == 5 && n < "32768") {
		w.WriteString("short")
	} else if l < 10 || (l == 10 && n < "2147483648") {
		w.WriteString("int")
	} else if l < 19 || (l == 19 && n < "9223372036854775808") {
		w.WriteString("long")
	} else {
		w.WriteString("BigInteger")
	}
	w.WriteString("\n")
	w.Flush()
}

// 66A
package main

import (
	"fmt"
)

func main() {
	var x string
	fmt.Scan(&x)
	if len(x) < 3 || (len(x) == 3 && x <= "127") {
		fmt.Print("byte")
	} else if len(x) < 5 || (len(x) == 5 && x <= "32767") {
		fmt.Print("short")
	} else if len(x) < 10 || (len(x) == 10 && x <= "2147483647") {
		fmt.Print("int")
	} else if len(x) < 19 || (len(x) == 19 && x <= "9223372036854775807") {
		fmt.Print("long")
	} else {
		fmt.Print("BigInteger")
	}
}

package main

import "os"
import "bufio"
import "strconv"

func main(){
	var n int64
	r := bufio.NewScanner(os.Stdin)
	r.Split(bufio.ScanWords)
	w := bufio.NewWriter(os.Stdout)
	r.Scan()
	n, _ = strconv.ParseInt(r.Text(), 0, 64)
	if n <= 127 {
		w.WriteString("byte")
	} else if n <= 32767 {
		w.WriteString("short")
	} else if n <= 2147483647 {
		w.WriteString("int")
	} else if n <= 9223372036854775807 {
		w.WriteString("long")
	} else {
		w.WriteString("BigInteger")
	}
	w.WriteString("\n")
	w.Flush()
}

package main

import "os"
import "bufio"
import "strconv"

func main(){
	var n float64
	r := bufio.NewScanner(os.Stdin)
	r.Split(bufio.ScanWords)
	w := bufio.NewWriter(os.Stdout)
	r.Scan()
	n, _ = strconv.ParseFloat(r.Text(), 64)
	if n >=0 {
		w.WriteString("byte")
	} else if n >= 128 {
		w.WriteString("short")
	} else if n >= 32768 {
		w.WriteString("int")
	} else if n >= 2147483648 {
		w.WriteString("long")
	} else if n >= 9223372036854775808 {
		w.WriteString("BigInteger")
	}
	w.WriteString("\n")
	w.Flush()
}

package main

import "os"
import "bufio"
//import "strconv"

func main(){
	var n string
	r := bufio.NewScanner(os.Stdin)
	r.Split(bufio.ScanWords)
	w := bufio.NewWriter(os.Stdout)
	r.Scan()
	n = r.Text()
	l := len(n)
	if n >= "0" && n < "128" && l <= 3 {
		w.WriteString("byte")
	} else if n >= "128" && n < "32768" && l <= 5 {
		w.WriteString("short")
	} else if n >= "32768" && n < "2147483648" && l <= 10 {
		w.WriteString("int")
	} else if n >= "2147483648" && n < "9223372036854775808" && l <= 19 {
		w.WriteString("long")
	} else {
		w.WriteString("BigInteger")
	}
	w.WriteString("\n")
	w.Flush()
}

package main

import "os"
import "bufio"
import "strconv"

func main(){
	var n float64
	r := bufio.NewScanner(os.Stdin)
	r.Split(bufio.ScanWords)
	w := bufio.NewWriter(os.Stdout)
	r.Scan()
	n, _ = strconv.ParseFloat(r.Text(), 64)
	if n <= 127 {
		w.WriteString("byte")
	} else if n <= 32767 {
		w.WriteString("short")
	} else if n <= 2147483647 {
		w.WriteString("int")
	} else if n <= 9223372036854775807 {
		w.WriteString("long")
	} else {
		w.WriteString("BigInteger")
	}
	w.WriteString("\n")
	w.Flush()
}

package main

import "os"
import "bufio"
import "strconv"

func main(){
	var n float64
	r := bufio.NewScanner(os.Stdin)
	r.Split(bufio.ScanWords)
	w := bufio.NewWriter(os.Stdout)
	r.Scan()
	n, _ = strconv.ParseFloat(r.Text(), 64)
	if n == 9223372036854775808 {
		w.WriteString("BigInteger")
	} else if n <= 127 {
		w.WriteString("byte")
	} else if n <= 32767 {
		w.WriteString("short")
	} else if n <= 2147483647 {
		w.WriteString("int")
	} else if n <= 9223372036854775807 {
		w.WriteString("long")
	} else {
		w.WriteString("BigInteger")
	}
	w.WriteString("\n")
	w.Flush()
}

package main

import "os"
import "bufio"

func main(){
	var n string
	r := bufio.NewScanner(os.Stdin)
	r.Split(bufio.ScanWords)
	w := bufio.NewWriter(os.Stdout)
	r.Scan()
	n = r.Text()
	if n <= "127" {
		w.WriteString("byte")
	} else if n <= "32767" {
		w.WriteString("short")
	} else if n <= "2147483647" {
		w.WriteString("int")
	} else if n <= "9223372036854775807" {
		w.WriteString("long")
	} else {
		w.WriteString("BigInteger")
	}
	w.WriteString("\n")
	w.Flush()
}


Petya is a big fan of mathematics, especially its part related to fractions. Recently he learned that a fraction  is called proper iff its numerator is smaller than its denominator (a < b) and that the fraction is called irreducible if its numerator and its denominator are coprime (they do not have positive common divisors except 1).During his free time, Petya thinks about proper irreducible fractions and converts them to decimals using the calculator. One day he mistakenly pressed addition button ( + ) instead of division button (÷) and got sum of numerator and denominator that was equal to n instead of the expected decimal notation. Petya wanted to restore the original fraction, but soon he realized that it might not be done uniquely. That's why he decided to determine maximum possible proper irreducible fraction  such that sum of its numerator and denominator equals n. Help Petya deal with this problem.

In the only line of input there is an integer n (3 ≤ n ≤ 1000), the sum of numerator and denominator of the fraction.

Output two space-separated positive integers a and b, numerator and denominator of the maximum possible proper irreducible fraction satisfying the given sum.

package main

import "fmt"

func nod(a, b int) int {
	for b != 0 {
		a, b = b, a%b
	}
	return a
}

func main() {
	var n int
	fmt.Scan(&n)
	for a := n / 2; a > 0; a-- {
		b := n - a
		if nod(a, b) == 1 {
			fmt.Println(a, b)
			return
		}
	}
}

package main

import (
	"fmt"
)

func main() {
	var (
		n int
	)
	fmt.Scan(&n)
	a, b := Calculate854A(n)
	fmt.Print(a, b)
}

func Calculate854A(n int) (int, int) {
	for a := n / 2; a > 0; a-- {
		var b = n - a
		if Gcd(a, b) == 1 {
			return a, b
		}
	}
	return 0, 0
}

func Gcd(a int, b int) (int) {
	for b != 0 {
		a, b = b, a%b
	}
	return a
}

package main

import (
	"fmt"
)

func main() {
	var (
		n int
	)
	fmt.Scan(&n)
	a, b := Calculate854A(n)
	fmt.Print(a, b)
}

func Calculate854A(n int) (int, int) {
	var maxA = 0
	var maxB = 0
	for i := 1; i < n; i++ {
		var a = i
		var b = n - i
		if a >= b {
			break
		}
		if Gcd(a, b) == 1 {
			maxA = a
			maxB = b
		}
	}
	return maxA, maxB
}

func Gcd(a int, b int) (int) {
	for b != 0 {
		a, b = b, a%b
	}
	return a
}

package main

import "fmt"

func gcd(a, b int) int {
	if b == 0 {
		return a
	}
	if a < b {
		return gcd(b, a)
	} else {
		return gcd(b, a%b)
	}
}

func main() {
	var n int
	fmt.Scan(&n)
	for i := n/2; i >= 1; i-- {
		if gcd(i, n-i) == 1 {
			fmt.Println(i, n-i)
			break
		}
	}
}

package main

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

func solve() {
	n := readInt()
	ansA := 0
	ansB := 0
	for i := 1; i <= n; i++ {
		a := i
		b := n - i
		if a < b {
			ok := true
			for j := 2; j <= a; j++ {
				if a%j == 0 && b%j == 0 {
					ok = false
					break
				}
			}
			if ok {
				ansA = a
				ansB = b
			}
		}
	}
	fmt.Printf("%d %d\n", ansA, ansB)
}

var scanner *bufio.Scanner

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

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

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

// IO

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

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

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

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

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

package main

import (
	"fmt"
)

func main() {
	var n int;
	fmt.Scan(&n);
	var an, bn int = 0, 1;
	var ch bool;
	for i := 1; i <= n / 2; i++ {

		b := n - i;
		if b < i {
			break;
		}
		ch = true;
		for a := 2; a <= i; a++ {
			if (i % a == 0) && (b % a == 0) {
				ch = false;
				break;
			}
		}
		if ch && bn * i > an * b {
			an, bn = i, b;
		}
	}
	fmt.Print(an," " ,  bn);
}

package main

import (
        "fmt"
)

func gcd(a int, b int) int {
        if b == 0 {
                return a
        }
        if a < b {
                return gcd(b, a)
        } else {
                return gcd(b, a%b)
        }
}

var num int

func main() {
        fmt.Scan(&num)
        div := num / 2
        for i := div; div >= 1; i-- {
                if gcd(i, num-i) == 1 {
                        fmt.Println(i, num-i)
                        break
                }
        }
}

package main

import (
	"fmt"
)

func gcd(a int32,b int32)(int32){

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

func main(){

	var n int32
	fmt.Scanf("%d",&n)
	value:=float64(0)
	var x,y int32
	for i:=int32(1);i<=1000;i++{
		for j:=int32(i);j<=1000;j++{
			if(i+j==n&&gcd(i,j)==1){
				var a,b float64
				a=float64(i)
				b=float64(j)
				tvalue:=a/b
				if(tvalue>value){
					x=int32(a)
					y=int32(b)
				}

			}

		}
	}

	fmt.Printf("%d %d",x,y)

}

package main

import "fmt"

func vzaimnoProst(a, b int) bool {
	return gcd(a, b) == 1
}

func gcd(a, b int) int {
	for a != b {
		if a > b {
			a -= b
		} else {
			b -= a
		}
	}

	return a
}

func main() {
	var a, b, n int
	fmt.Scanf("%d", &n)
	if n%2 == 0 {
		a = n/2 - 1
		b = n/2 + 1
	} else {
		a = n / 2
		b = n/2 + 1
	}
	for !vzaimnoProst(a, b) {
		a--
		b++
	}
	fmt.Println(a, b)
}

package main

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

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

	for a := N / 2; a >= 1; a-- {
		if gcd(a, N-a) == 1 {
			fmt.Println(a, N-a)
			return
		}
	}
}

func gcd(a, b int) int {
	for b > 0 {
		a, b = b, a%b
	}
	return a
}

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 main() {
	var n, x, a, b int
	fmt.Scan(&n)
	for x = n / 2; x > 0; x-- {
		for a, b = n-x, x; b != 0; {
			a, b = b, a%b
		}
		if a == 1 {
			break
		}
	}
	fmt.Println(x, n-x)
}

// cf854a project main.go
package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)
	var a, b int
	for i := n / 2; ; i-- {
		a = i
		b = n - a
		flag := true
		for j := a; j > 1; j-- {
			if a%j == 0 && b%j == 0 {
				flag = false
				break
			}
		}
		if flag {
			break
		}
	}
	fmt.Println(a, b)
}

package main

import (
	"fmt"
)

func main() {
	var (
		n int
	)
	fmt.Scan(&n)
	a, b := Calculate854A(n)
	fmt.Print(a, b)
}

func Calculate854A(n int) (int, int) {
	var maxA = 0
	var maxB = 0
	for i := 1; i < n; i++ {
		var a = i
		var b = n - i
		if a >= b {
			break
		}
		if Gcd(a, b) != 0 {
			maxA = a
			maxB = b
		}
	}
	return maxA, maxB
}

func Gcd(a int, b int) (int) {
	for b != 0 {
		a, b = b, a%b
	}
	return a
}

package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	var a, b int
	if n %2 == 0{
		a = n/2-1
		b = n/2+1
	} else {
		a = n/2
		b = n/2+1
	}
	fmt.Println(a, " ", b)
}

package main

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

func solve() {
	n := readInt()
	ansA := 0
	ansB := 0
	for i := 1; i <= n; i++ {
		a := i
		b := n - i
		if a < b {
			ok := true
			for j := 2; j < a; j++ {
				if a%j == 0 && b%j == 0 {
					ok = false
					break
				}
			}
			if ok {
				ansA = a
				ansB = b
			}
		}
	}
	fmt.Printf("%d %d\n", ansA, ansB)
}

var scanner *bufio.Scanner

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

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

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

// IO

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

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

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

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

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

package main

import ()

func main() {

}

package main

import "fmt"

func vzaimnoProst(a, b int) bool {
	return gcd(a, b) == 1
}

func gcd(a, b int) int {
	for a != b {
		if a > b {
			a -= b
		} else {
			b -= a
		}
	}

	return a
}

func main() {
	var a, b, n int
	fmt.Scanf("%d", &n)
	if n%2 == 0 {
		a = n/2 - 1
		b = n/2 + 1
	} else {
		a = n / 2
		b = n/2 + 1
	}
	for !vzaimnoProst(a, b) {
		a++
		b--
	}
	fmt.Println(a, b)
}


Vasya has a non-negative integer n. He wants to round it to nearest integer, which ends up with 0. If n already ends up with 0, Vasya considers it already rounded.For example, if n = 4722 answer is 4720. If n = 5 Vasya can round it to 0 or to 10. Both ways are correct.For given n find out to which integer will Vasya round it.

The first line contains single integer n (0 ≤ n ≤ 109) — number that Vasya has.

Print result of rounding n. Pay attention that in some cases answer isn't unique. In that case print any correct answer.

NoteIn the first example n = 5. Nearest integers, that ends up with zero are 0 and 10. Any of these answers is correct, so you can print 0 or 10.

package main

import "fmt"

func main() {
  var n int
  fmt.Scan(&n)
  ans := 10 * (n / 10)
  if n % 10 > 5 {
    ans += 10
  }
  fmt.Println(ans)
}

package main
import "fmt"
func main() {
    var n uint64
    fmt.Scan(&n)
    if n%10 > 5 {
        fmt.Print(n+(10-(n%10)))
    } else {
        fmt.Print(n-(n%10))
    }
}

package main

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

func solve() {
	n := readInt()
	v := n % 10
	if v > 5 {
		n += 10 - v
	} else {
		n -= v
	}
	fmt.Println(n)
}

var scanner *bufio.Scanner

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

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

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

// IO

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

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

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

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

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

package main

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

var helper SHelper

func main() {
	helper.Init()
	n := helper.ReadInt64()
	l := n / 10
	r := n % 10
	if r == 0 {
		fmt.Println(n)
	} else if r <= 5 {
		fmt.Println(l * 10)
	} else {
		fmt.Println((l + 1) * 10)
	}
}

type SHelper struct {
	file *os.File
	scanner *bufio.Scanner
}

func (this *SHelper) Init() {
	this.file = os.Stdin
	this.scanner = bufio.NewScanner(this.file)
	this.scanner.Split(bufio.ScanWords)
}

func (this *SHelper) ReadInt64() int64 {
	this.scanner.Scan()
	n, err:= strconv.ParseInt(this.scanner.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return n
}

package main

import "fmt"

func main() {
    var n uint64
    fmt.Scan(&n)
    last := n%10
    if last <= 5 {
        n = n - last
    } else {
        n = n + (10 - last)
    }
    fmt.Print(n)
}

package main

import "fmt"

func main() {
    var n int
    fmt.Scan(&n)
    n = n - n%10
    fmt.Print(n)
}


After playing Neo in the legendary "Matrix" trilogy, Keanu Reeves started doubting himself: maybe we really live in virtual reality? To find if this is true, he needs to solve the following problem.Let's call a string consisting of only zeroes and ones good if it contains different numbers of zeroes and ones. For example, 1, 101, 0000 are good, while 01, 1001, and 111000 are not good.We are given a string $$$s$$$ of length $$$n$$$ consisting of only zeroes and ones. We need to cut $$$s$$$ into minimal possible number of substrings $$$s_1, s_2, \ldots, s_k$$$ such that all of them are good. More formally, we have to find minimal by number of strings sequence of good strings $$$s_1, s_2, \ldots, s_k$$$ such that their concatenation (joining) equals $$$s$$$, i.e. $$$s_1 + s_2 + \dots + s_k = s$$$.For example, cuttings 110010 into 110 and 010 or into 11 and 0010 are valid, as 110, 010, 11, 0010 are all good, and we can't cut 110010 to the smaller number of substrings as 110010 isn't good itself. At the same time, cutting of 110010 into 1100 and 10 isn't valid as both strings aren't good. Also, cutting of 110010 into 1, 1, 0010 isn't valid, as it isn't minimal, even though all $$$3$$$ strings are good.Can you help Keanu? We can show that the solution always exists. If there are multiple optimal answers, print any.

The first line of the input contains a single integer $$$n$$$ ($$$1\le n \le 100$$$) — the length of the string $$$s$$$. The second line contains the string $$$s$$$ of length $$$n$$$ consisting only from zeros and ones.

In the first line, output a single integer $$$k$$$ ($$$1\le k$$$) — a minimal number of strings you have cut $$$s$$$ into. In the second line, output $$$k$$$ strings $$$s_1, s_2, \ldots, s_k$$$ separated with spaces. The length of each string has to be positive. Their concatenation has to be equal to $$$s$$$ and all of them have to be good. If there are multiple answers, print any.

NoteIn the first example, the string 1 wasn't cut at all. As it is good, the condition is satisfied.In the second example, 1 and 0 both are good. As 10 isn't good, the answer is indeed minimal.In the third example, 100 and 011 both are good. As 100011 isn't good, the answer is indeed minimal.

package main

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

func main() {
	var read = bufio.NewReader(os.Stdin)
	var write = bufio.NewWriter(os.Stdout)
	defer write.Flush()
	var n int
	fmt.Fscan(read, &n)
	var s string
	fmt.Fscan(read, &s)
	if n%2 == 1 {
		fmt.Fprintln(write, 1)
		fmt.Fprint(write, s)
		return
	}
	var a = strings.Split(s, "")
	var n1, n0 int
	for i := 0; i < n; i++ {
		if a[i] == "1" {
			n1++
		} else {
			n0++
		}
	}
	if n1 != n0 {
		fmt.Fprintln(write, 1)
		fmt.Fprint(write, s)
		return
	}
	fmt.Fprintln(write, 2)
	for i := 0; i < n-1; i++ {
		fmt.Fprint(write, a[i])
	}
	fmt.Fprint(write, " ", a[n-1])

}

package main

import (
	"fmt"
)

func main() {
	var a string
	var n, cnt int
	// var x float64
	// var s string
	// scr := bufio.NewReader(os.Stdin)
	// ocr := bufio.NewWriter(os.Stdout)

	fmt.Scanln(&n)
	fmt.Scanln(&a)
	m := make(map[string]int)

	m = count(a, m)

	if m["1"] == m["0"] {
		cnt = 2
	} else {
		cnt = 1
	}

	fmt.Println(cnt)

	if cnt == 2 {
		for x := range a {
			m2 := make(map[string]int)
			m1 := make(map[string]int)
			if x > 0 {
				m2 = count(a[:x], m2)
				m1 = count(a[x:], m1)
				if (m2["1"] != m2["0"]) && (m1["0"] != m1["1"]) {
					fmt.Println(a[:x], " ", a[x:])
					break
				}
			}
		}

	} else {
		fmt.Println(a)
	}
}

func count(a string, m map[string]int) map[string]int {
	for _, y := range a {
		m[string(y)]++
	}
	return m
}

package main

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

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

    count := 0
    for _, ch := range str {
        if ch == '1' {
            count++
        } else {
            count--
        }
    }
    if count != 0 {
        fmt.Printf("1\n%v\n", str)
    } else {
        fmt.Printf("2\n%c %v\n", str[0], str[1:len(str)])
    }
}

package main

import "fmt"

func main() {
	var n int
	var s string
	fmt.Scanln(&n)
	fmt.Scanln(&s)
	o := 0
	l := 0
	for _, r := range s {
		if r == '0' {
			o++
		} else {
			l++
		}
	}
	if l != o {
		fmt.Println(1)
		fmt.Println(s)
		return
	}
	fmt.Println(2)
	fmt.Println(string(s[0]), string(s[1:]))

}

package main

import (
	"fmt"
)
func main() {
	var n int
	var str string

	fmt.Scanln(&n)
	fmt.Scanln(&str)

	l:=0
	r:=0

	for _,s:=range str{
		if s=='0'{
			l++
		} else {
			r++;
		}
	}
	if l!=r{
		fmt.Println(1);
		fmt.Println(str);
		return;
	}
	fmt.Println(2);
	fmt.Println(string(str[0]),string(str[1:]))

}

package main

import "fmt"

func main() {
	var n int
	fmt.Scanln(&n)
	var x string
	fmt.Scanln(&x)
	diff := 0
	for _, c := range x {
		if c == '0' {
			diff++
		} else {
			diff--
		}
	}
	if diff == 0 {
		fmt.Println(2)
		fmt.Print(string(x[0]), " ")
		for i, c := range x {
			if i == 0 {
				continue
			}
			fmt.Print(string(c))
		}
	} else {
		fmt.Println(1)
		fmt.Println(x)
	}
}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var count int
	var number string

	fmt.Scan(&count, &number)

	if strings.Count(number, "0") == strings.Count(number, "1") {
		fmt.Println("2")
		fmt.Print(number[:len(number)-1], " ", string(number[len(number)-1]))
	} else {
		fmt.Println("1")
		fmt.Print(number)
	}
}

package main

import "fmt"

func main() {
	var n, cnt0, cnt1 int32
	fmt.Scanf("%d\n", &n)
	var str string
	fmt.Scanf("%s\n", &str)

	for _, c := range(str) {
		if c == '0' {
			cnt0 ++
		} else {
			cnt1 ++
		}
	}
	if (cnt0 != cnt1) {
		fmt.Println(1)
		fmt.Println(str)
	} else {
		fmt.Println(2)
		fmt.Println(str[0:1], str[1:])
	}
}

package main

import "fmt"

// 800
//https://codeforces.com/problemset/problem/1189/A

func main() {
	var v []byte
	fmt.Scanln(&v)
	fmt.Scanln(&v)
	var ones, zeros int
	for _, k := range v {
		if k == '1' {
			ones++
		} else {
			zeros++
		}
	}
	if ones != zeros {
		fmt.Println("1")
		fmt.Println(string(v))
	} else {
		fmt.Println("2")
		fmt.Println(string(v[0]), string(v[1:]))
	}
}

package main

import (
	"fmt"
	"strings"
)

func retCount(str string) (int, int) {
	one := strings.Count(str, "1")
	zero := strings.Count(str, "0")
	return one, zero
}

func check(str string) bool {
	one, zero := retCount(str)
	if one == zero {
		return false
	} else {
		return true
	}
}

func main() {
	var n, i int
	var s string
	fmt.Scan(&n)
	fmt.Scan(&s)
	if check(s) {
		fmt.Println(1)
		fmt.Println(s)
		return
	}
	if n == 1 {
		fmt.Println(n)
		fmt.Println(s)
		return
	}
	if n%2 == 0 {
		fmt.Println(2)
		fmt.Println(s[:n-1] + " " + s[n-1:])
	} else {
		for i = 1; i < n; i++ {
			if check(s[:i]) && check(s[i:]) {
				break
			}
		}
		if i != n {
			fmt.Println(2)
			fmt.Println(s[:i] + " " + s[i:])
		} else {
			fmt.Println(3)
			fmt.Println(s[:n-2] + " " + s[n-2:n-1] + " " + s[n-1:n])
		}
	}
}

package main

import (
	"fmt"
)

func right(n int, stroka string) int {
	var one int = 0
	var zero int = 0
	for i := 0; i < n; i++ {
		if stroka[i] == '1' {
			one += 1
		} else if stroka[i] == '0' {
			zero += 1
		}
	}
	if one == zero {
		return 2
	} else {
		return 1
	}
}

func main() {
	var n int
	var stroka string
	fmt.Scan(&n)
	fmt.Scan(&stroka)
	if n%2 == 1 {
		fmt.Println(1)
		fmt.Println(stroka)
	} else {
		fmt.Println(right(n, stroka))
		if right(n, stroka) == 1 {
			fmt.Println(stroka)
		} else {
			fmt.Println(stroka[:1], stroka[1:])
		}

	}
}

package main

import (
	"fmt"
)

// 6
// 100011

func main() {
	var n int
	fmt.Scanln(&n)
	sum := 0
	var x string
	fmt.Scanln(&x)
	for i := 0; i < n; i++ {
		if x[i] == '0' {
			sum++
		} else {
			sum--
		}
	}
	if sum == 0 {
		fmt.Println(2)
		fmt.Printf("%s %c", x[0:len(x)-1], x[len(x)-1])
	} else {
		fmt.Println(1)
		fmt.Println(x)
	}
}

package main

import "fmt"

func main() {
	var s string
	var c int

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

	for _, v := range s {
		if v == 49 {
			c++
		}
	}

	if c*2 == len(s) {
		fmt.Println(2)
		fmt.Println(s[:len(s)-1], s[len(s)-1:])
	} else {
		fmt.Println(1)
		fmt.Println(s)
	}
}

package main

import (
    "fmt"
    "strings"
)

func main() {
    var n int
    var s string
    fmt.Scan(&n)
    fmt.Scan(&s)
    c := strings.Count(s, "1")
    if 2 * c != n {
        fmt.Printf("1\n%s\n", s)
    } else {
        fmt.Printf("2\n%s %s\n", s[:1], s[1:])
    }
}

package main

import "fmt"

func main(){
	var n int
	_,_=fmt.Scanln(&n)
	var s string
	_,_=fmt.Scanln(&s)
	cnt1,cnt2:=0,0
	for _,v:=range s {
		if v == '1' {
			cnt1++
		} else {
			cnt2++
		}
	}
	if cnt1 == cnt2 {
		fmt.Println(2)
		fmt.Printf("%s %c\n",s[0:n-1],s[n-1])
	}else{
		fmt.Println(1)
		fmt.Println(s)
	}
}

// Author: sighduck
// URL: https://codeforces.com/contest/1189/problem/A

package main

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

func Solve(n int, s string) []string {
	ones := 0
	zeros := 0
	for _, char := range s {
		if string(char) == "1" {
			ones += 1
		} else {
			zeros += 1
		}
	}
	if ones != zeros {
		return []string{s}
	}
	return []string{string(s[0]), s[1:]}
}

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

	var n int
	var s string
	fmt.Fscanf(reader, "%d\n", &n)
	fmt.Fscanf(reader, "%s\n", &s)

	solution := Solve(n, s)
	fmt.Fprintf(writer, "%d\n", len(solution))
	for i := 0; i < len(solution); i++ {
		fmt.Fprintf(writer, "%s ", solution[i])
	}
	fmt.Fprintf(writer, "\n")
}

package main

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

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

    count := 0
    for _, ch := range str {
        if ch == '1' {
            count++
        } else {
            count--
        }
    }
    if count != 0 {
        fmt.Printf("1\n%v\n", str)
    } else {
        fmt.Printf("2\n%c %v\n", str[0], str[1:len(str)])
    }
}

package main

import (
	"fmt"
)

func main() {
	var n int
	var s string
	fmt.Scan(&n)
	fmt.Scan(&s)
	if n == 1 {
		fmt.Println(n)
		fmt.Println(s)
		return
	}
	if n%2 == 0 {
		fmt.Println(2)
		fmt.Println(s[:n/2] + " " + s[n/2:])
	} else {
		fmt.Println(3)
		fmt.Println(s[:n/2] + " " + s[n/2:n/2+1] + " " + s[n/2+1:])
	}
}

package main

import (
	"fmt"
	"strings"
)

func retCount(str string) (int, int) {
	one := strings.Count(str, "1")
	zero := strings.Count(str, "0")
	return one, zero
}

func main() {
	var n, i int
	var s string
	fmt.Scan(&n)
	fmt.Scan(&s)
	if n == 1 {
		fmt.Println(n)
		fmt.Println(s)
		return
	}
	if n%2 == 0 {
		fmt.Println(2)
		fmt.Println(s[:n/2] + " " + s[n/2:])
	} else {
		for i = 1; i < n; i++ {
			one, zero := retCount(s[1:])
			if one != zero {
				break
			}
		}
		if i != n {
			fmt.Println(2)
			fmt.Println(s[:i] + " " + s[i:])
		} else {
			fmt.Println(3)
			fmt.Println(s[:n/2] + " " + s[n/2:n/2+1] + " " + s[n/2+1:])
		}
	}
}

package main

import (
	"fmt"
	"strings"
)

func retCount(str string) (int, int) {
	one := strings.Count(str, "1")
	zero := strings.Count(str, "0")
	return one, zero
}

func check(str string) bool {
	one, zero := retCount(str)
	if one == zero {
		return false
	} else {
		return true
	}
}

func main() {
	var n, i int
	var s string
	fmt.Scan(&n)
	fmt.Scan(&s)
	if n == 1 {
		fmt.Println(n)
		fmt.Println(s)
		return
	}
	if n%2 == 0 {
		fmt.Println(2)
		fmt.Println(s[:n-1] + " " + s[n-1:])
	} else {
		for i = 1; i < n; i++ {
			if check(s[:i]) && check(s[i:]) {
				break
			}
		}
		if i != n {
			fmt.Println(2)
			fmt.Println(s[:i] + " " + s[i:])
		} else {
			fmt.Println(3)
			fmt.Println(s[:n-2] + " " + s[n-2:n-1] + " " + s[n-1:n])
		}

	}
}

package main

import (
	"fmt"
)

func right(n int, stroka string) int {
	var one int = 0
	var zero int = 0
	for i := 0; i < n; i++ {
		if stroka[i] == '1' {
			one += 1
		} else if stroka[i] == '0' {
			zero += 1
		}
	}
	if one == zero {
		return 2
	} else {
		return 1
	}
}

func main() {
	var n int
	var stroka string
	fmt.Scan(&n)
	fmt.Scan(&stroka)
	if n%2 == 1 {
		fmt.Println(1)
		fmt.Println(stroka)
	} else {
		fmt.Println(right(n, stroka))
		fmt.Println(stroka[:1], stroka[1:])
	}
}


One day Kefa found n baloons. For convenience, we denote color of i-th baloon as si — lowercase letter of the Latin alphabet. Also Kefa has k friends. Friend will be upset, If he get two baloons of the same color. Kefa want to give out all baloons to his friends. Help Kefa to find out, can he give out all his baloons, such that no one of his friens will be upset — print «YES», if he can, and «NO», otherwise. Note, that Kefa's friend will not upset, if he doesn't get baloons at all.

The first line contains two integers n and k (1 ≤ n, k ≤ 100) — the number of baloons and friends. Next line contains string s — colors of baloons.

Answer to the task — «YES» or «NO» in a single line. You can choose the case (lower or upper) for each letter arbitrary.

NoteIn the first sample Kefa can give 1-st and 3-rd baloon to the first friend, and 2-nd and 4-th to the second.In the second sample Kefa needs to give to all his friends baloons of color a, but one baloon will stay, thats why answer is «NO».

package main

import (
	"fmt"
)

func main() {
	var balls string
	var n,k int

	fmt.Scan(&n, &k, &balls)

	colors := make(map[rune]int,0)

	for _,clr := range balls {
		colors[clr]++
	}

	for _,num := range colors {
		if num > k {
			fmt.Println("NO")
			return
		}
	}

	fmt.Println("YES")
}

package main

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

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

	readInt(reader)
	k := readInt(reader)
	skipLine(reader)

	a := make(map[byte]int, 26)
	s := readLine(reader)

	//fmt.Printf("*s:%v\n", *s)

	for i := 0; i<len((*s)); i++ {
		c, ok := a[(*s)[i]];
		if !ok {
			a[(*s)[i]] = 1
		} else {
			a[(*s)[i]] = c + 1
		}
	}

	//fmt.Printf("a:%v\n", a)

	ok := true
	for _, v := range a {
		if v>k {
			ok = false
			break
		}
	}

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

}

func readLine(nr *bufio.Reader) *string {
	line, _, err := nr.ReadLine()
	if err!=nil {
		panic(err)
	}
	s := string(line)
	return &s
}

func skipLine(nr *bufio.Reader) {
	_, _, err := nr.ReadLine()
	if err!=nil {
		panic(err)
	}
}

func readInt(nr *bufio.Reader) int {
	var a int
	fmt.Fscan(nr, &a)
	return a
}

func readA(n int) *[]int {
	a := make([]int, n)

	reader := bufio.NewReader(os.Stdin)

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

	return &a
}

package main

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

func main() {
    var n, k int
    var baloons string
    var m = make(map[string]int)

    stdin := bufio.NewReader(os.Stdin)
    fmt.Fscanf(stdin, "%d %d\n", &n, &k)
    fmt.Fscanf(stdin, "%s\n", &baloons)

    // count number of baloon based on color
    for i := 0; i < n; i++ {
        m[string(baloons[i])]++
    }

    isPossible := true
    for _, v := range m {
        if v > k {
            isPossible = false
            break
        }
    }

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

package main

/*
    The idea to solve this problem is by noticing that we need to make sure
    that each friends given baloon by Kefa doesn't get same color more than once.
    Which means the number of baloon of for each color must be the same number
    of Kefa friends or less (because his friends won't be angry if they do not get
    baloon)
*/

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

func main() {
    var n, k int
    var baloons string
    var m = make(map[string]int)

    stdin := bufio.NewReader(os.Stdin)
    fmt.Fscanf(stdin, "%d %d\n", &n, &k)
    fmt.Fscanf(stdin, "%s\n", &baloons)

    // count number of baloon based on color
    for i := 0; i < n; i++ {
        m[string(baloons[i])]++
    }

    isPossible := true
    for _, v := range m {
        if v > k {
            isPossible = false
            break
        }
    }

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

package main

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

const maxInputSize = 512 * 1024 //bytes

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

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

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

	yes := true
	l := make([]int, 26)

	for i := 0; i < n; i++ {
		l[s[i]-97]++
		if l[s[i]-97] > k {
			yes = false
		}
	}

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

package main

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

func solve() {
	_ = readInt()
	k := readInt()
	cnt := map[rune]int{}
	for _, v := range readString() {
		cnt[v]++
	}
	for _, v := range cnt {
		if v > k {
			fmt.Println("NO")
			return
		}

	}
	fmt.Println("YES")
}

var scanner *bufio.Scanner

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

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

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

// IO

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

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

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

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

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

package main

import "fmt"

func main() {
    var n, k int
    fmt.Scan(&n, &k)
    ballonByColor := make([]int, 256)
    var str string
    fmt.Scan(&str)
    for _, r := range str {
        ballonByColor[int(r)]++
    }
    for i:=0; i<256; i++ {
        if ballonByColor[i] > k {
            fmt.Print("NO")
            return
        }
    }
    fmt.Print("YES")
}

package main

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

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 (
	"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
		}
	}
}


Two positive integers a and b have a sum of s and a bitwise XOR of x. How many possible values are there for the ordered pair (a, b)?

The first line of the input contains two integers s and x (2 ≤ s ≤ 1012, 0 ≤ x ≤ 1012), the sum and bitwise xor of the pair of positive integers, respectively.

Print a single integer, the number of solutions to the given conditions. If no solutions exist, print 0.

NoteIn the first sample, we have the following solutions: (2, 7), (3, 6), (6, 3), (7, 2).In the second sample, the only solutions are (1, 2) and (2, 1).

package main

import (
	"fmt"
)

func needs(sum, xor, carry, digit int64) int64 {
	if digit < 1 {
		return 1 - carry
	}

	if (xor & digit) != 0 {
		if (sum & digit) != 0 {
			return (1 - carry) * 2 * needs(sum, xor, 0, digit>>1)
		}
		return carry * 2 * needs(sum, xor, 1, digit>>1)
	}

	if (sum & digit) != 0 {
		return needs(sum, xor, 1, digit>>1)
	}
	return needs(sum, xor, 0, digit>>1)
}

func main() {
	var sum, xor int64
	fmt.Scan(&sum, &xor)

	if sum != xor {
		fmt.Println(needs(sum, xor, 0, 1<<62))
	} else {
		fmt.Println(needs(sum, xor, 0, 1<<62) - 2)
	}
}

package main

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

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

const BITS = 50

var s, x int64

func main() {
	defer out.Flush()
	fmt.Fscan(in, &s, &x)
	ans := solve(0, 0)
	if s == x {
		ans -= 2
	}
	fmt.Fprintln(out, ans)
}

func solve(i, carry int) int64 {
	if i == BITS {
		if carry == 0 {
			return 1
		}
		return 0
	}
	key := Key{i, carry}
	if result, ok := cache[key]; ok {
		return result
	}
	result := int64(0)
	for a := 0; a <= 1; a++ {
		b := a ^ get(i, x)
		sum := a + b + carry
		if sum&1 == get(i, s) {
			result += solve(i+1, sum>>1)
		}
	}
	cache[key] = result
	return result
}

var cache = map[Key]int64{}

type Key struct {
	i, carry int
}

func get(i int, x int64) int {
	return int((x >> uint(i)) & 1)
}

package main

import "fmt"

func solve(s, x int64) int64 {
	if (s-x)%2 == 1 {
		return 0
	}
	if ((s-x)/2)&x != 0 {
		return 0
	}
	if s < x {
		return 0
	}
	res := int64(1)
	for y := x; y > 0; y &= (y - 1) {
		res *= 2
	}
	if s-x == 0 {
		res -= 2
	}
	return res
}

func main() {
	var s, x int64
	fmt.Scan(&s, &x)
	fmt.Println(solve(s, x))
}

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 {
		ans = int64(1) << bits.OnesCount64(uint64(x))
		if d == 0 {
			ans -= 2
		}
	}
	Fprint(out, ans)
}

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

package main

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

// github.com/EndlessCheng/codeforces-go
func main() {
	var s, x, ans int64
	Scan(&s, &x)
	if d := s - x; d >= 0 && d&1 == 0 && d/2|x == d/2+x {
		ans = int64(1) << bits.OnesCount64(uint64(x))
		if d == 0 {
			ans -= 2
		}
	}
	Print(ans)
}

package main

import (
	"fmt"
)

func needs(sum, xor, carry, digit int64) int64 {
	if digit <= 0 {
		if carry == 0 {
			return 1
		}
		return 0
	}

	if (xor & digit) != 0 {
		if (sum & digit) != 0 {
			if carry != 0 {
				return 0
			}
			return 2 * needs(sum, xor, 0, digit>>1)
		}
		if carry != 0 {
			return 2 * needs(sum, xor, 1, digit>>1)
		}
		return 0
	}

	if (sum & digit) != 0 {
		return needs(sum, xor, 1, digit>>1)
	}
	return needs(sum, xor, 0, digit>>1)
}

func main() {
	var sum, xor int64
	fmt.Scan(&sum, &xor)

	if sum != xor {
		fmt.Println(needs(sum, xor, 0, 1<<62))
	} else {
		fmt.Println(needs(sum, xor, 0, 1<<62) - 2)
	}
}

package main

import (
	"fmt"
)

func main() {
	var sum, xor, count, total int
	fmt.Scan(&sum, &xor)
	var bits []int
	count = 0

	for xor > 0 {
		count = (count << 1) | 1
		bits = append(bits, xor-xor&(xor-1))
		xor = xor & (xor - 1)
	}

	for ; count >= 0; count-- {
		left := 0
		right := 0

		for i, val := range bits {
			if (count & (1 << uint(i))) > 0 {
				left += val
			} else {
				right += val
			}
		}

		if left >= sum || right >= sum {
			continue
		}
		if left == right {
			total++
			if (sum-(left+right))%2 != 0 {
				total++
			}
		} else {
			if (sum-(left+right))%2 == 0 {
				total++
			}
		}
		// fmt.Println(count, bits, left, right, "=", total)
	}
	fmt.Println(total)
}

package main

import (
	"fmt"
)

func main() {
	var sum, xor int
	fmt.Scan(&sum, &xor)

	if ((sum - xor) % 2) != 0 {
		fmt.Println(0)
		return
	}
	xorbits := 0
	sumbits := 0
	mask := 1

	for mask <= xor && mask <= sum {
		if xor&mask > 0 {
			xorbits++
		}
		if sum&mask > 0 {
			sumbits++
		}
		mask <<= 1
	}
	xorbits *= 2

	if sum&xor == sum {
		xorbits -= sumbits
	}
	fmt.Println(xorbits)
}

package main

import (
	"fmt"
)

func main() {
	var sum, xor, count, total int
	fmt.Scan(&sum, &xor)
	var bits []int
	count = 0

	for xor > 0 {
		count = (count << 1) | 1
		bits = append(bits, xor-xor&(xor-1))
		xor = xor & (xor - 1)
	}

	for ; count >= 0; count-- {
		left := 0
		right := 0

		for i, val := range bits {
			if (count & (1 << uint(i))) > 0 {
				left += val
			} else {
				right += val
			}
		}

		if left >= sum || right >= sum {
			continue
		}
		if left == right {
			total++
			if sum-(left+right)%2 != 0 {
				total++
			}
		} else {
			if (sum-(left+right))%2 == 0 {
				total++
			}
		}
		// fmt.Println(count, bits, left, right, "=", total)
	}
	fmt.Println(total)
}

package main

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

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

const BITS = 15

var s, x int

func main() {
	defer out.Flush()
	fmt.Fscan(in, &s, &x)

	//for i := 0; i < BITS; i++ {
	//	fmt.Fprint(out, get(i, s))
	//}
	//fmt.Fprintln(out)
	//for i := 0; i < BITS; i++ {
	//	fmt.Fprint(out, get(i, x))
	//}
	//fmt.Fprintln(out)

	ans := solve(0, 0)
	if s == x {
		ans -= 2
	}
	fmt.Fprintln(out, ans)
}

func solve(i, carry int) int64 {
	if i == BITS {
		if carry == 0 {
			return 1
		}
		return 0
	}
	key := Key{i, carry}
	if result, ok := cache[key]; ok {
		return result
	}
	result := int64(0)
	for a := 0; a <= 1; a++ {
		b := a ^ get(i, x)
		sum := a + b + carry
		if sum&1 == get(i, s) {
			//fmt.Fprintln(out, i, a, b, carry, "works", sum>>1)
			result += solve(i+1, sum>>1)
		}
	}
	//fmt.Fprintln(out, i, carry, ">", result)
	cache[key] = result
	return result
}

var cache = map[Key]int64{}

type Key struct {
	i, carry int
}

func get(i, x int) int {
	return (x >> uint(i)) & 1
}

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) }


The HR manager was disappointed again. The last applicant failed the interview the same way as 24 previous ones. "Do I give such a hard task?" — the HR manager thought. "Just raise number 5 to the power of n and get last two digits of the number. Yes, of course, n can be rather big, and one cannot find the power using a calculator, but we need people who are able to think, not just follow the instructions."Could you pass the interview in the machine vision company in IT City?

The only line of the input contains a single integer n (2 ≤ n ≤ 2·1018) — the power in which you need to raise number 5.

Output the last two digits of 5n without spaces between them.

package main

import "fmt"

func main() {
	fmt.Println(25)
}

package main

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

// Buffered IO for fast I/O.
var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

// Helper function to wrap around the buffered IO.
func printf(f string, a ...interface{}) {
	fmt.Fprintf(writer, f, a...)
}

// Helper function to take an input from the user.
func scanf(f string, a ...interface{}) {
	fmt.Fscanf(reader, f, a...)
}

// Solve
func solve() {
	// Solve the problem!
	var numberOfFactors int
	scanf("%d", &numberOfFactors)

	// Any 5 powered by anything will always have '25' as its last two digits.
	printf("25\n")
	return
}

func main() {
	defer writer.Flush()
	solve()
}

package main

import "fmt"

func main(){
	fmt.Println(25)
}

package main

import "fmt"

func main() {
	fmt.Println("25")
}

package main

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

func main() {
	var n uint64
	in := bufio.NewReader(os.Stdin)
    fmt.Fscanf(in, "%d \n", &n)
    fmt.Println(25)
    // result := int(math.Pow(5, float64(n)))
    // stringresult := strconv.Itoa(result)
    // fmt.Println(stringresult[len(stringresult)-2:len(stringresult)])
}

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) {
	fmt.Println(25)
}

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 n int64
	fmt.Scan(&n)
	fmt.Println(25)
}

package main

import (
	"fmt"
	"os"
)

func main() {
	fmt.Fprintln(os.Stdout, 25)
}

package main

import (
	"fmt"
)

func pow(a, b int64) int64 {
	if b <= 0 {
		return 1
	}
	if b <= 1 {
		return a
	}
	return pow((a*a)%100, b/2)
}

func main() {
	var b int64
	fmt.Scan(&b)
	fmt.Println(pow(5, b))
}

package main

import (
	"fmt"
)

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

	switch n {
	case 0:
		fmt.Println("1")
	case 1:
		fmt.Println("5")
	default:
		fmt.Println("25")
	}
}

package main

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

func main() {
	var n uint64
	in := bufio.NewReader(os.Stdin)
	fmt.Fscanf(in, "%d \n", &n)
    result := int(math.Pow(5, float64(n)))
    stringresult := strconv.Itoa(result)
    fmt.Println(stringresult[len(stringresult)-2:len(stringresult)])
}

package main
import "fmt"
func main() {
    fmt.Println("hello world")
}

package main

import (
	"fmt"
)

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

	switch n {
	case 0:
		fmt.Println("1")
	case 1:
		fmt.Println("5")
	default:
		fmt.Println("25")
	}
}


In the city of Ultima Thule job applicants are often offered an IQ test. The test is as follows: the person gets a piece of squared paper with a 4 × 4 square painted on it. Some of the square's cells are painted black and others are painted white. Your task is to repaint at most one cell the other color so that the picture has a 2 × 2 square, completely consisting of cells of the same color. If the initial picture already has such a square, the person should just say so and the test will be completed. Your task is to write a program that determines whether it is possible to pass the test. You cannot pass the test if either repainting any cell or no action doesn't result in a 2 × 2 square, consisting of cells of the same color.

Four lines contain four characters each: the j-th character of the i-th line equals "." if the cell in the i-th row and the j-th column of the square is painted white, and "#", if the cell is black.

Print "YES" (without the quotes), if the test can be passed and "NO" (without the quotes) otherwise.

NoteIn the first test sample it is enough to repaint the first cell in the second row. After such repainting the required 2 × 2 square is on the intersection of the 1-st and 2-nd row with the 1-st and 2-nd column.

package main

import "fmt"

func check(x [4]string, a int, b int) bool {
    cnt := 0
    for i := a; i < (a+2); i++ {
        for j := b; j < (b+2); j++ {
            if x[i][j] != x[a][b] { cnt++ }
        }
    }
    if cnt == 2 { return false } else { return true }
}

func main() {
    var x [4]string
    for i := 0; i < 4; i++ {
        fmt.Scan(&x[i])
    }
    ans := false
    for i := 0; i < 3; i++ {
        for j := 0; j < 3; j++ {
            if check(x,i,j) {
                ans = true
                break
            }
        }
    }
    if ans { fmt.Println("YES") } else { fmt.Println("NO") }
}

package main

import "fmt"

func check(x [4]string, a int, b int) bool { // mengecek return value fungsi array x elemen ke 4, variabel a dan b dengan jenis int
    cnt := 0                    // membuat variabel cnt kemudian diisi dengan 0
    for i := a; i < (a+2); i++ {                // looping
        for j := b; j < (b+2); j++ {                // looping ke 2
            if x[i][j] != x[a][b] { cnt++ }  // jika array x elemen i dan j tidak sama dengan array x elemen a dan b maka cnt ditambah
        }
    }
    if cnt == 2 { return false } else { return true } // jika cnt sama dengan 2 maka return false, lainnya return true
}

func main() {
    var x [4]string     // membuat variabel array x elemen ke 4 dengan jenis string
    for i := 0; i < 4; i++ { // looping ke 3
        fmt.Scan(&x[i])   // mengambil input
    }
    ans := false        // membuat variabel ans kemudian diisi dengan false
    for i := 0; i < 3; i++ {    //looping ke 4
        for j := 0; j < 3; j++ {  // looping ke 5
            if check(x,i,j) {   // jika check x,i dan j maka ans sama dengan true kemudian keluar dari fungsi
                ans = true
                break
            }
        }
    }
    if ans { fmt.Println("YES") } else { fmt.Println("NO") } // jika ans maka cetak Yes, lainnya cetak NO
}

package main

import "fmt"

func main() {
	s := make([]string, 4)
	for i := range s {
		fmt.Scanln(&s[i])
	}
	for i := 0; i < 3; i++ {
		for j := 0; j < 3; j++ {
			cnt := 0
			if s[i][j] == '.' {
				cnt++
			}
			if s[i+1][j] == '.' {
				cnt++
			}
			if s[i][j+1] == '.' {
				cnt++
			}
			if s[i+1][j+1] == '.' {
				cnt++
			}
			if cnt != 2 {
				fmt.Println("YES")
				return
			}
		}
	}
	fmt.Println("NO")
}

// 287A-mic
package main

import (
    "fmt"
)

func main() {
    arr := make([]string, 4)
    for i := 0; i < 4; i++ {
        fmt.Scan(&arr[i])
    }

    for i := 0; i < 3; i++ {
        for j := 0; j < 3; j++ {
            if arr[i][j] == arr[i][j+1] && arr[i][j] == arr[i+1][j] && arr[i][j] == arr[i+1][j+1] {
                fmt.Println("YES")
                return
            } else if arr[i][j] == arr[i][j+1] && arr[i][j] == arr[i+1][j] {
                fmt.Println("YES")
                return
            } else if arr[i][j] == arr[i][j+1] && arr[i][j] == arr[i+1][j+1] {
                fmt.Println("YES")
                return
            } else if arr[i+1][j] == arr[i+1][j+1] && arr[i+1][j] == arr[i][j+1] {
                fmt.Println("YES")
                return
            } else if arr[i+1][j] == arr[i+1][j+1] && arr[i+1][j] == arr[i][j] {
                fmt.Println("YES")
                return
            }
        }
    }
    fmt.Println("NO")

}

package main

import "fmt"

func check(x [4]string, a int, b int) bool {
    cnt := 0
    for i := a; i < (a+2); i++ {
        for j := b; j < (b+2); j++ {
            if x[i][j] != x[a][b] { cnt++ }
        }
    }
    if cnt <= 1 { return true } else { return false }
}

func main() {
    var x [4]string
    for i := 0; i < 4; i++ {
        fmt.Scan(&x[i])
    }
    ans := false
    for i := 0; i < 3; i++ {
        for j := 0; j < 3; j++ {
            if check(x,i,j) {
                ans = true
                break
            }
        }
    }
    if ans { fmt.Println("YES") } else { fmt.Println("NO") }
}

package main

import "fmt"

func main() {
	s := make([]string, 4)
	for i := range s {
		fmt.Scanln(&s[i])
	}
	for i := 0; i < 2; i++ {
		for j := 0; j < 2; j++ {
			cnt := 0
			if s[i][j] == '.' {
				cnt++
			}
			if s[i+1][j] == '.' {
				cnt++
			}
			if s[i][j+1] == '.' {
				cnt++
			}
			if s[i+1][j+1] == '.' {
				cnt++
			}
			if cnt <= 1 || cnt >= 3 {
				fmt.Println("YES")
				return
			}
		}
	}
	fmt.Println("NO")
}


Your friend has n cards.You know that each card has a lowercase English letter on one side and a digit on the other.Currently, your friend has laid out the cards on a table so only one side of each card is visible.You would like to know if the following statement is true for cards that your friend owns: "If a card has a vowel on one side, then it has an even digit on the other side." More specifically, a vowel is one of 'a', 'e', 'i', 'o' or 'u', and even digit is one of '0', '2', '4', '6' or '8'.For example, if a card has 'a' on one side, and '6' on the other side, then this statement is true for it. Also, the statement is true, for example, for a card with 'b' and '4', and for a card with 'b' and '3' (since the letter is not a vowel). The statement is false, for example, for card with 'e' and '5'. You are interested if the statement is true for all cards. In particular, if no card has a vowel, the statement is true.To determine this, you can flip over some cards to reveal the other side. You would like to know what is the minimum number of cards you need to flip in the worst case in order to verify that the statement is true.

The first and only line of input will contain a string s (1 ≤ |s| ≤ 50), denoting the sides of the cards that you can see on the table currently. Each character of s is either a lowercase English letter or a digit.

Print a single integer, the minimum number of cards you must turn over to verify your claim.

NoteIn the first sample, we must turn over both cards. Note that even though both cards have the same letter, they could possibly have different numbers on the other side.In the second sample, we don't need to turn over any cards. The statement is vacuously true, since you know your friend has no cards with a vowel on them.In the third sample, we need to flip the second and fourth cards.

package main

import "fmt"

func main() {
	var s string
	fmt.Scan(&s)
	ans := 0
	for i := range s {
		switch s[i] {
		case 'a', 'e', 'i', 'o', 'u', '1', '3', '5', '7', '9':
			ans++
		}
	}
	fmt.Println(ans)
}

package main

/*
	To verify whether or not the statement is valid, basically
	we just need to check cards with vowel or cards with odd number
*/

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

func main() {
	var str string
	stdin := bufio.NewReader(os.Stdin)
	fmt.Fscanf(stdin, "%s", &str)
	shouldCheck := 0
	for i := 0; i < len(str); i++ {
		ch := string(str[i])
		num, err := strconv.Atoi(ch)
		if err != nil {
			if ch == "a" || ch == "i" || ch == "u" || ch == "e" || ch == "o" {
				shouldCheck++
			}
		} else {
			if num%2 != 0 {
				shouldCheck++
			}
		}
	}
	fmt.Println(shouldCheck)
}

package main

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

func main() {
	var str string
	stdin := bufio.NewReader(os.Stdin)
	fmt.Fscanf(stdin, "%s", &str)
	shouldCheck := 0
	for i := 0; i < len(str); i++ {
		ch := string(str[i])
		num, err := strconv.Atoi(ch)
		if err != nil {
			if ch == "a" || ch == "i" || ch == "u" || ch == "e" || ch == "o" {
				shouldCheck++
			}
		} else {
			if num%2 != 0 {
				shouldCheck++
			}
		}
	}
	fmt.Println(shouldCheck)
}

package main

import "fmt"

func main() {
	var s string
	var ans int
	vowel := []int32{'a','e','i','o','u','1','3','5','7','9'}
	fmt.Scanf("%s",&s)
	for _, ch := range s {
		for _, v := range vowel {
			if ch == v {
				ans++
			}
		}
	}
	fmt.Print(ans)
}

package main

import "fmt"

func vowel_l(r rune) bool {
    if r == 'a' || r == 'e' || r == 'i' || r == 'o' || r == 'u' {
        return true
    }
    return false
}

func odd(r rune) bool {
    if r == '1' || r == '3' || r == '5' || r == '7' || r == '9' {
        return true
    }
    return false
}

func main() {
    var s string
    fmt.Scan(&s)
    var cnt int
    for _, r := range s {
        if vowel_l(r) || odd(r) {
            cnt++
        }
    }
    fmt.Print(cnt)
}

package main

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

func main() {
	sc := NewScanner()
	S := sc.NextLine()
	count := 0
	for _, v := range S {
		switch v {
		case 'a', 'i', 'u', 'e', 'o', '1', '3', '5', '7', '9':
			count++

		}
	}
	fmt.Println(count)

}

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

func main() {
	var s string
	fmt.Scanln(&s)
	var ans int
	for i := 0; i < len(s); i++ {
		if s[i] >= '0' && s[i] <= '9' {
			if (s[i]-'0')%2 == 1 {
				ans++
			}
		} else {
			if strings.IndexByte("aeiou", s[i]) != -1 {
				ans++
			}
		}
	}
	fmt.Println(ans)
}

package main

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

func main() {
	var s string
	fmt.Scan(&s)
	g := "aeiou"
	k := 0
	for _,a := range s {
		if strings.Count(g,string(a)) >0  {
			k++
		}
		n,err := strconv.Atoi(string(a))
		if err==nil && n%2 !=0 {
			k++
		}
	}
	fmt.Println(k)
}

package main

import "fmt"

func vowel_l(r rune) bool {
    if r == 'a' || r == 'e' || r == 'i' || r == 'u' {
        return true
    }
    return false
}

func odd(r rune) bool {
    if r == '1' || r == '3' || r == '5' || r == '7' || r == '9' {
        return true
    }
    return false
}

func main() {
    var s string
    fmt.Scan(&s)
    var cnt int
    for _, r := range s {
        if vowel_l(r) || odd(r) {
            cnt++
        }
    }
    fmt.Print(cnt)
}

package main

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

func main() {
	sc := NewScanner()
	S := sc.NextLine()
	count := 0
	for _, v := range S {
		switch v {
		case 'a', 'i', 'u', 'e', 'o', '0', '2', '4', '6', '8':
			count++

		}
	}
	fmt.Println(count)

}

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

func main() {
	var s string
	fmt.Scanln(&s)
	var ans int
	for i := 0; i < len(s); i++ {
		if s[i] >= '0' && s[i] <= '9' {
			if (s[i]-'0')%2 == 0 {
				ans++
			}
		} else {
			if strings.IndexByte("aeiou", s[i]) != -1 {
				ans++
			}
		}
	}
	fmt.Println(ans)
}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var s string
	fmt.Scanln(&s)
	var ans int
	for i := 0; i < len(s); i++ {
		if s[i] >= '0' && s[i] <= '9' {
			if (s[i]-'0')%2 == 0 {
				ans++
			}
		} else {
			if strings.IndexByte("aeios", s[i]) != -1 {
				ans++
			}
		}
	}
	fmt.Println(ans)
}