package main

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

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

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

func init() {
	ReadString = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	// r.Buffer(make([]byte, 1024), int(1e+11)) // for AtCoder
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	// Split sets the split function for the Scanner. The default split function is ScanLines.
	// Split panics if it is called after scanning has started.
	r.Split(bufio.ScanWords)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	return res
}

/*********** DP sub-functions ***********/

// ChMin accepts a pointer of integer and a target value.
// If target value is SMALLER than the first argument,
//	then the first argument will be updated by the second argument.
func ChMin(updatedValue *int, target int) bool {
	if *updatedValue > target {
		*updatedValue = target
		return true
	}
	return false
}

// ChMax accepts a pointer of integer and a target value.
// If target value is LARGER than the first argument,
//	then the first argument will be updated by the second argument.
func ChMax(updatedValue *int, target int) bool {
	if *updatedValue < target {
		*updatedValue = target
		return true
	}
	return false
}

// NthBit returns nth bit value of an argument.
// n starts from 0.
func NthBit(num, nth int) int {
	return num >> uint(nth) & 1
}

// OnBit returns the integer that has nth ON bit.
// If an argument has nth ON bit, OnBit returns the argument.
func OnBit(num, nth int) int {
	return num | (1 << uint(nth))
}

// OffBit returns the integer that has nth OFF bit.
// If an argument has nth OFF bit, OffBit returns the argument.
func OffBit(num, nth int) int {
	return num & ^(1 << uint(nth))
}

// PopCount returns the number of ON bit of an argument.
func PopCount(num int) int {
	res := 0

	for i := 0; i < 70; i++ {
		if ((num >> uint(i)) & 1) == 1 {
			res++
		}
	}

	return res
}

/*********** Arithmetic ***********/

// Max returns the max integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func Max(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m < integer {
			m = integer
		}
	}
	return m
}

// Min returns the min integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func Min(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m > integer {
			m = integer
		}
	}
	return m
}

// Sum returns multiple integers sum.
func Sum(integers ...int) int {
	s := 0

	for _, i := range integers {
		s += i
	}

	return s
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int) int {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

// AbsInt is integer version of math.Abs
func AbsInt(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

// Gcd returns the Greatest Common Divisor of two natural numbers.
// Gcd only accepts two natural numbers (a, b >= 1).
// 0 or negative number causes panic.
// Gcd uses the Euclidean Algorithm.
func Gcd(a, b int) int {
	if a <= 0 || b <= 0 {
		panic(errors.New("[argument error]: Gcd only accepts two NATURAL numbers"))
	}
	if a < b {
		a, b = b, a
	}

	// Euclidean Algorithm
	for b > 0 {
		div := a % b
		a, b = b, div
	}

	return a
}

// Lcm returns the Least Common Multiple of two natural numbers.
// Lcd only accepts two natural numbers (a, b >= 1).
// 0 or negative number causes panic.
// Lcd uses the Euclidean Algorithm indirectly.
func Lcm(a, b int) int {
	if a <= 0 || b <= 0 {
		panic(errors.New("[argument error]: Gcd only accepts two NATURAL numbers"))
	}

	// a = a'*gcd, b = b'*gcd, a*b = a'*b'*gcd^2
	// a' and b' are relatively prime numbers
	// gcd consists of prime numbers, that are included in a and b
	gcd := Gcd(a, b)

	// not (a * b / gcd), because of reducing a probability of overflow
	return (a / gcd) * b
}

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

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

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

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

	return string(res)
}

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

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

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

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

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

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

const MOD = 1000000000 + 7
const ALPHABET_NUM = 26
const INF_INT64 = math.MaxInt64
const INF_BIT60 = 1 << 60

var da, db int

func main() {
	da, db = ReadInt2()

	if da == 9 && db == 1 {
		fmt.Println(9, 10)
		return
	}

	if da > db {
		fmt.Println(-1)
	} else if da == db {
		a := da * 10
		b := a + 1
		fmt.Println(a, b)
	} else {
		if db-da == 1 {
			a := da*10 + 9
			b := a + 1
			fmt.Println(a, b)
		} else {
			fmt.Println(-1)
		}
	}
}

// MODはとったか？
// 遷移だけじゃなくて最後の最後でちゃんと取れよ？

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


package main

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

// -----------------------------------------------------------------------------

// IO helper functions

// Returns next token from input.  It must be initialized by SetInput()
// before the first call.
var nextToken func() ([]byte, error)
var nextLine func() ([]byte, error)

// Holds a buffer for output.  It must be initialized by SetOutput().
// All IO fucntions (read*() and [e]print*()) should write to OutputWriter
// instead of this.
var OutputBuffer *bufio.Writer

// Holds an io.Writer.  It must be initialized by SetOutput()
var OutputWriter io.Writer

// Set IO functions for interactive input/output.
func SetInteractive(w io.Writer, r io.Reader) {
	SetUnbefferedInput(r)
	OutputBuffer = nil
	OutputWriter = w
}

// Setup OutputBuffer and OutputWriter.
func SetOutput(w io.Writer) {
	OutputBuffer = bufio.NewWriter(w)
	OutputWriter = OutputBuffer
}

// Flushes OutputBuffer
func Flush() {
	if OutputBuffer != nil {
		OutputBuffer.Flush()
	}
}

// Returns true if c is a white space
func IsSpace(c byte) bool {
	switch c {
	case '\t', '\n', '\v', '\f', '\r', ' ':
		return true
	}
	return false
}

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

// Setup nextToken with input buffer.
func SetInput(r io.Reader) {
	buf := new(bytes.Buffer)
	var b []byte

	var i int
	rest := func() ([]byte, error) {
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		return b[j:i], nil
	}
	initial := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextToken = rest
		return rest()
	}
	nextToken = initial

	restLn := func() ([]byte, error) {
		for i < len(b) && IsNewLine(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsNewLine(b[i]) {
			i++
		}
		return b[j:i], nil
	}

	initialLn := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextLine = restLn
		return restLn()
	}
	nextLine = initialLn
}

// Setup nextToken without input buffer.
func SetUnbefferedInput(r io.Reader) {
	buf := bufio.NewReader(r)
	var b []byte

	var i int
	nextToken = func() ([]byte, error) {
		var err error
		if i == len(b) {
			b, err = buf.ReadBytes('\n')
			if err != nil {
				return nil, err
			}
			i = 0
			j := len(b) - 1
			for 0 <= j && IsSpace(b[j]) {
				j--
			}
			b = b[0 : j+1]
		}
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		if i == j {
			return nil, io.ErrUnexpectedEOF
		}
		return b[j:i], nil
	}
}

// -----------------------------------------------------------------------------

// IO functions

// Reads next token and return it as []byte
func readb() []byte {
	b, err := nextToken()
	if err != nil {
		panic(err)
	}
	return b
}

// Reads next token and return it as string
func reads() string {
	return string(readb())
}

// Read next line as []byte
func readbln() []byte {
	b, err := nextLine()
	if err != nil {
		panic(err)
	}
	return b
}

// Read next line as string
func readsln() string {
	return string(readbln())
}

// Reads next token and return it as int64
func readll() int64 {
	i, err := strconv.ParseInt(reads(), 10, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// Reads next token and return it as int
func readi() int {
	return int(readll())
}

// Reads next token and return it as float64
func readf() float64 {
	f, err := strconv.ParseFloat(reads(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// Write args to OutputWriter with the format f
func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(OutputWriter, f, args...)
}

// Write args to OutputWriter without format
func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(OutputWriter, args...)
}

// Write args to stderr with the format f
func eprintf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(os.Stderr, f, args...)
}

// Write args to stderr without format
func eprintln(args ...interface{}) (int, error) {
	return fmt.Fprintln(os.Stderr, args...)
}

// -----------------------------------------------------------------------------

// Simple math functions

const (
	// big prime
	INF  = 1000000007
	INF2 = 1000000009
	INF3 = 998244353
)

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

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

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

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

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

func absll(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// egcd(a, b) returns d, x, y:
//   d is gcd(a,b)
//   x, y are  integers that satisfy ax + by = d
func egcd(a, b int) (int, int, int) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcd(b, a%b)
	return d, y, x - a/b*y
}

func egcdll(a, b int64) (int64, int64, int64) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcdll(b, a%b)
	return d, y, x - a/b*y
}

func gcd(a, b int) int {
	d, _, _ := egcd(a, b)
	return d
}

func gcdll(a, b int64) int64 {
	d, _, _ := egcdll(a, b)
	return d
}

// set up IO functions
func init() {
	// for non-interactive
	SetInput(os.Stdin)
	SetOutput(os.Stdout)

	// Enable below when interactive.  Its ok to leave above intact.
	// SetInteractive(os.Stdout, os.Stdin)
}

func main() {
	defer Flush()

	a := readi()
	b := readi()
	if b-a == 1 {
		println(a, b)
		return
	}
	if b == a {
		printf("%d0 %d1\n", a, b)
		return
	}
	// 1x + 1 = 9y
	if a < b {
		println(-1)
		return
	}
	// 9x +1 = 1y
	if a == 9 && b == 1 {
		println(9, 10)
		return
	}
	println(-1)
}


package main

import "fmt"

func main() {
	var a, b int
	fmt.Scanln(&a, &b)
	if a == 9 && b == 1 {
		fmt.Println("99 100")
	} else if a > b || b-a >= 2 {
		fmt.Println(-1)
	} else {
		fmt.Println(solution(a, b))
	}
}

func solution(x, y int) (int, int) {
	if x == y {
		return x * 10, y*10 + 1
	}
	return x*10 + 9, y * 10
}


package main

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

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

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

func init() {
	ReadString = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	// r.Buffer(make([]byte, 1024), int(1e+11)) // for AtCoder
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	// Split sets the split function for the Scanner. The default split function is ScanLines.
	// Split panics if it is called after scanning has started.
	r.Split(bufio.ScanWords)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	return res
}

/*********** DP sub-functions ***********/

// ChMin accepts a pointer of integer and a target value.
// If target value is SMALLER than the first argument,
//	then the first argument will be updated by the second argument.
func ChMin(updatedValue *int, target int) bool {
	if *updatedValue > target {
		*updatedValue = target
		return true
	}
	return false
}

// ChMax accepts a pointer of integer and a target value.
// If target value is LARGER than the first argument,
//	then the first argument will be updated by the second argument.
func ChMax(updatedValue *int, target int) bool {
	if *updatedValue < target {
		*updatedValue = target
		return true
	}
	return false
}

// NthBit returns nth bit value of an argument.
// n starts from 0.
func NthBit(num, nth int) int {
	return num >> uint(nth) & 1
}

// OnBit returns the integer that has nth ON bit.
// If an argument has nth ON bit, OnBit returns the argument.
func OnBit(num, nth int) int {
	return num | (1 << uint(nth))
}

// OffBit returns the integer that has nth OFF bit.
// If an argument has nth OFF bit, OffBit returns the argument.
func OffBit(num, nth int) int {
	return num & ^(1 << uint(nth))
}

// PopCount returns the number of ON bit of an argument.
func PopCount(num int) int {
	res := 0

	for i := 0; i < 70; i++ {
		if ((num >> uint(i)) & 1) == 1 {
			res++
		}
	}

	return res
}

/*********** Arithmetic ***********/

// Max returns the max integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func Max(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m < integer {
			m = integer
		}
	}
	return m
}

// Min returns the min integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func Min(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m > integer {
			m = integer
		}
	}
	return m
}

// Sum returns multiple integers sum.
func Sum(integers ...int) int {
	s := 0

	for _, i := range integers {
		s += i
	}

	return s
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int) int {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

// AbsInt is integer version of math.Abs
func AbsInt(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

// Gcd returns the Greatest Common Divisor of two natural numbers.
// Gcd only accepts two natural numbers (a, b >= 1).
// 0 or negative number causes panic.
// Gcd uses the Euclidean Algorithm.
func Gcd(a, b int) int {
	if a <= 0 || b <= 0 {
		panic(errors.New("[argument error]: Gcd only accepts two NATURAL numbers"))
	}
	if a < b {
		a, b = b, a
	}

	// Euclidean Algorithm
	for b > 0 {
		div := a % b
		a, b = b, div
	}

	return a
}

// Lcm returns the Least Common Multiple of two natural numbers.
// Lcd only accepts two natural numbers (a, b >= 1).
// 0 or negative number causes panic.
// Lcd uses the Euclidean Algorithm indirectly.
func Lcm(a, b int) int {
	if a <= 0 || b <= 0 {
		panic(errors.New("[argument error]: Gcd only accepts two NATURAL numbers"))
	}

	// a = a'*gcd, b = b'*gcd, a*b = a'*b'*gcd^2
	// a' and b' are relatively prime numbers
	// gcd consists of prime numbers, that are included in a and b
	gcd := Gcd(a, b)

	// not (a * b / gcd), because of reducing a probability of overflow
	return (a / gcd) * b
}

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

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

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

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

	return string(res)
}

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

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

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

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

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

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

const MOD = 1000000000 + 7
const ALPHABET_NUM = 26
const INF_INT64 = math.MaxInt64
const INF_BIT60 = 1 << 60

var da, db int

func main() {
	da, db = ReadInt2()

	if da > db {
		fmt.Println(-1)
	} else if da == db {
		a := da * 10
		b := a + 1
		fmt.Println(a, b)
	} else {
		if db-da == 1 {
			a := da*10 + 9
			b := a + 1
			fmt.Println(a, b)
		} else {
			fmt.Println(-1)
		}
	}
}

// MODはとったか？
// 遷移だけじゃなくて最後の最後でちゃんと取れよ？

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


package main

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

func main() {

	reader := bufio.NewReader(os.Stdin)
	var a, b int

	fmt.Fscanf(reader, "%d %d\n", &a, &b)
	if b-a > 1 || a > b {
		fmt.Println(-1)
		return
	}

	if a == 9 && b == 1 {
		fmt.Println(9, 10)
		return
	}

	if a == b {
		fmt.Println(a*10, b*10+1)
	} else {
		fmt.Println(b*100-1, b*100)
	}
}


package main

import (
	"fmt"
)

func main() {
	var da, db int
	if _, err := fmt.Scanf("%d %d", &da, &db); err != nil {
		panic(err)
	}

	if db == da {
		fmt.Printf("%d0 %d1\n", da, db)
	} else if da == 9 && db == 0 {
		fmt.Println("9 10")
	} else if db == da+1 {
		fmt.Printf("%d9 %d0\n", da, db)
	} else {
		fmt.Println("-1")
	}
}


package main

import "fmt"

func main() {

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

	if a == b {
		fmt.Printf("%d0 %d1", a, b)
	} else if a == b-1 {
		fmt.Printf("%d9 %d0", a, b)
	} else {
		fmt.Println(-1)
	}
}


package main

import "fmt"

func main() {
	var a, b, x, y int
	fmt.Scanln(&a, &b)

	x, y = solution(a, b)

	if (x == 0) && (y == 0) {
		fmt.Println(-1)
	} else {
		fmt.Println(x, y)
	}
}

func solution(x, y int) (int, int) {
	if x == y {
		return x * 10, y*10 + 1
	}
	if y == x+1 {
		return x*10 + 9, y * 10
	}
	return 0, 0
}


package main

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

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

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

	s := next()
	t := "CODEFORCES"
	idx := 0
	r, l := "", ""

	for i := 0; i < len(t); i++ {
		r, l = t[:i], t[i:]

		idx = strings.Index(s, r)

		if idx >= 0 && strings.Index(s[idx+1:], l) >= 0 {
			println("YES")
			return
		}
	}

	println("NO")
}

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

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

func nextInt64() int64 {
	n, _ := strconv.ParseInt(next(), 0, 64)
	return n
}

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

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

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

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

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


package main

import (
	"fmt"
)

func main() {
	var s string
	fmt.Scan(&s)
	size := len(s)
	extra := size - len("CODEFORCES")
	if extra < 0 {
		fmt.Println("NO")
		return
	}
	for i := 0; i < size-extra; i++ {
		x := s[:i] + s[i+extra:]
		if x == "CODEFORCES" {
			fmt.Println("YES")
			return
		}
	}
	fmt.Println("NO")
}


package main

import (
	"fmt"
	"strings"
)

func main() {
	word := "CODEFORCES"

	var s string
	fmt.Scanf("%s", &s)

	if strings.HasSuffix(s, word) {
		fmt.Println("YES")
		return
	}
	i := 0
	for ; i < len(s) && i < len(word); i++ {
		if s[i] != word[i] {
			break
		}
	}

	if strings.HasSuffix(s, word[i:]) {
		fmt.Println("YES")
		return
	}

	fmt.Println("NO")
}


package main

import (
	"fmt"
	"strings"
)

func main() {
	word := "CODEFORCES"

	var s string
	fmt.Scanf("%s", &s)

	i := 0
	for ; i < len(s) && i < len(word); i++ {
		if s[i] != word[i] {
			break
		}
	}

	if strings.HasSuffix(s, word[i:]) {
		fmt.Println("YES")
		return
	}

	fmt.Println("NO")
}


package main

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

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

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

	s := next()
	t := "CODEFORCES"

	for i := 0; i <= len(t); i++ {
		if strings.HasPrefix(s, t[:i]) && strings.HasSuffix(s, t[i:]) {
			println("YES")
			return
		}
	}

	println("NO")
}

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

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

func nextInt64() int64 {
	n, _ := strconv.ParseInt(next(), 0, 64)
	return n
}

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

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

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

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

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


package main

import (
	"fmt"
)

func main() {
	var s string
	fmt.Scan(&s)
	size := len(s)
	extra := size - len("CODEFORCES")
	if extra < 0 {
		fmt.Println("NO")
		return
	}
	for i := 0; i <= size-extra; i++ {
		x := s[:i] + s[i+extra:]
		if x == "CODEFORCES" {
			fmt.Println("YES")
			return
		}
	}
	fmt.Println("NO")
}


package main

import (
	"fmt"
)

func main() {
	const cf = "CODEFORCES"
	var s string
	fmt.Scan(&s)
	if len(s) < len(cf) {
		fmt.Println("NO")
		return
	}
	b := 0
	for i := range cf {
		if s[i] != cf[i] {
			break
		}
		b++
	}
	e := 0
	for i := range cf {
		if s[len(s)-1-i] != cf[len(cf)-1-i] {
			break
		}
		e++
	}
	if b+e >= len(cf) {
		fmt.Println("YES")
		return
	}
	fmt.Println("NO")
}


package main

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

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

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

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

  word := "CODEFORCES"
  result := "NO"
  n := len(word)
  s := getS()
  m := len(s)
  for i := 0; i <= n && i <= m; i++ {
    j := m - n + i
    if j < i {
      break
    }
    for ; j < m; j++ {
      if s[j] != word[n - m + j] {
        break
      }
    }
    if j == m {
      result = "YES"
      break
    }
    if s[i] != word[i] {
      break
    }
  }
  writer.WriteString(fmt.Sprintf("%s\n", result))
}


package main

import (
	"fmt"
)

func main() {
	var s string
	fmt.Scan(&s)
	size := len(s)
	extra := size - len("CODEFORCES")
	for i := 0; i < size-extra; i++ {
		x := s[:i] + s[i+extra:]
		if x == "CODEFORCES" {
			fmt.Println("YES")
			return
		}
	}
	fmt.Println("NO")
}


package main

import "fmt"

func main() {
	var a, b, r int64;
	fmt.Scan(&a, &b)
	for r = 1; a < b; b-- {
		r *= b % 10
		if r == 0 {
			break
		}
	}
	fmt.Println(r % 10)
}


package main

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

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

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

type intPair struct {
	a int64
	b int64
}

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

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

func main() {
	defer writer.Flush()

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

	var ans = (a+1) % int64(10)

	if a == b {
		printf("1\n")
		return
	}

	for i:=a+2;i<=b && ans != 0; i++ {
		ans = (ans * (i % int64(10)) % int64(10) )
	}

	printf("%d\n", ans)
}


package main

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

func solve() {
	a := readInt64()
	b := readInt64()

	res := int64(1)
	cnt := 0
	for i := a + 1; i <= b; i++ {
		m := int64(1)
		if i != 0 {
			m = i
		}
		m %= 10
		res %= 10
		res *= m
		if cnt > 10 {
			break
		}
		cnt++
	}
	fmt.Println(res % 10)
}

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

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

var scanner *bufio.Scanner

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

// IO

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

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

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

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

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


package main
import "fmt"

func main() {
    var a, b, x int64
    x = 1

    fmt.Scan(&a, &b);

    for i := a + 1; i <= b; i++ {
        x = (x * i % 10) % 10
        if x == 0 {
            break
        }
    }

    fmt.Println(x);
}


package main

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

// IO
var scanner *bufio.Scanner

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

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

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

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

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

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

func slove() {
	a := readInt64()
	b := readInt64()

	res := int64(1)
	cnt := 0
	for i := a + 1; i <= b; i++ {
		m := int64(1)
		if i != 0 {
			m = i
		}
		m %= 10
		res %= 10
		res *= m
		if cnt > 10 {
			break
		}
		cnt++
	}
	fmt.Println(res % 10)

}


package main

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

func solve() {
	a := readInt64()
	b := readInt64()

	res := int64(1)
	cnt := 0
	for i := a + 1; i <= b; i++ {
		m := int64(1)
		if i != 0 {
			m = i
		}
		m %= 10
		res %= 10
		res *= m
		if cnt > 10 {
			break
		}
	}
	fmt.Println(res % 10)
}

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

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

var scanner *bufio.Scanner

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

// IO

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

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

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

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

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


package main

import "fmt"

func main() {
	var a, b, r int;
	fmt.Scan(&a, &b)
	for r = 1; a < b; b-- {
		r *= b % 10
		if r == 0 {
			break
		}
	}
	fmt.Println(r % 10)
}


package main

import "fmt"

func main() {
	var n, k, t int
	fmt.Scan(&n, &k, &t)
	if n < t {
		n += k - t
	}
	if n > k {
		n = k
	}
	fmt.Println(n)
}


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

package main

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

const debug = true

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

	in := gsli(reader)

	n := in[0]
	k := in[1]
	t := in[2]

	ans := 0
	if t <= k {
		ans = t
	} else if t <= n {
		ans = k
	} else {
		ans = k + n - t
	}

	fmt.Println(ans)

}

// Input helpers

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

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

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

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

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

	return
}

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

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

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

	return
}

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

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

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

	return
}

// String helpers

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

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

// Math helpers

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

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

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

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

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

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

// Output helpers

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

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

// Debug helpers

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

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


package main

import "fmt"

func main() {
	l := []int{0, 0, 0}
	fmt.Scan(&l[0], &l[1], &l[2])
	r := l[0] + l[1] - l[2]
	for _, x := range l {
		if r > x {
			r = x
		}
	}
	fmt.Println(r)
}


package main

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

func main() {

	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	init := scanner.Text()
	heights := strings.Split(init, " ")

	cater, _ := strconv.Atoi(heights[0])
	apple, _ := strconv.Atoi(heights[1])

	scanner.Scan()
	input := scanner.Text()
	ins := strings.Split(input, " ")

	upS, _ := strconv.Atoi(ins[0])
	dS, _ := strconv.Atoi(ins[1])

	diffDay := (upS - dS) * 12
	days := 0
	// lets move for day1 first
	cater = (cater + 8*upS)
	if cater >= apple {
		fmt.Println(days)
		return
	}
	if dS >= upS {
		fmt.Println(-1)
		return
	}
	for {
		if cater >= apple {
			fmt.Println(days)
			return
		}

		days++
		cater += diffDay
	}

}


package main

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

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

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

	h1, h2 := nextInt(), nextInt()
	a, b := nextInt(), nextInt()

	h1 += a * 8

	if a <= b {
		if h1 < h2 {
			println(-1)
			return
		}
	}

	day := 0

	for h1 < h2 {
		h1 += (a - b) * 12
		day++
	}

	println(day)
}

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

func nextInt64() int64 {
	n, _ := strconv.ParseInt(next(), 0, 64)
	return n
}

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

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

func println(a ...interface{})               { fmt.Fprintln(writer, a...) }
func print(a ...interface{})                 { fmt.Fprint(writer, a...) }
func printf(format string, a ...interface{}) { fmt.Fprintf(writer, format, a...) }


package main

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

func modPow(x, n, p int64) int64 {
	res := int64(1)
	for n != 0 {
		if n%2 == 1 {
			res = res * x % p
		}
		x = x * x % p
		n >>= 1
	}
	return res
}

func comb(n, m, p int64) int64 {
	if m > n {
		return 0
	}
	ret := int64(1)
	m = min(n-m, m)
	for i := int64(1); i <= m; i++ {
		a := (n + i - m) % p
		b := i % p
		ret = ret * (a * modPow(b, p-2, p) % p) % p
	}
	return ret
}

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

func lucas(n, m, p int64) int64 {
	if m == 0 {
		return 1
	}
	return comb(n%p, m%p, p) * lucas(n/p, m/p, p) % p
}

const (
	mod = int64(998244353)
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	t := 1
	//fmt.Fscanf(in, "%d\n", &t)
	for tt := 0; tt < t; tt++ {
		n, m := int64(0), int64(0)
		fmt.Fscanf(in, "%d %d\n", &n, &m)
		ans := lucas(m, n-1, mod)
		ans *= (n - 2)
		ans %= mod
		for i := int64(0); i < n-3; i++ {
			ans *= 2
			ans %= mod
		}
		fmt.Fprintf(out, "%d\n", ans)
	}
	return
}

func getMi(a int64) int64 {
	if a == 1 {
		return 0
	}
	return 1 + getMi(a/2)
}


package main

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

func getInts() []int64 {
	//assumes POSITIVE INTEGERS. Check v for '-' if you have negative.
	var buf []byte
	buf, _ = ioutil.ReadAll(os.Stdin)
	var ints []int64
	num := int64(0)
	found := false
	for _, v := range buf {
		if '0' <= v && v <= '9' {
			num = 10*num + int64(v-'0') //could use bitshifting here.
			found = true
		} else if found {
			ints = append(ints, num)
			found = false
			num = 0
		}
	}
	if found {
		ints = append(ints, num)
		found = false
		num = 0
	}
	return ints
}

const mod = 998244353

func binpow(a, n uint64) (res uint64) {
	res = 1
	for n != 0 {
		if (n & 1) != 0 {
			res *= a
			res %= mod
		}
		a *= a
		a %= mod
		n >>= 1
	}
	return res
}

// http://e-maxx.ru/algo/reverse_element
func inv(a uint64) uint64 {
	return binpow(a, mod-2)
}

func main() {
	ints := getInts()

	n := uint64(ints[0])
	m := uint64(ints[1])

	if n-1 > m {
		fmt.Println(0)
		return
	}

	if n == 2 {
		fmt.Println(0)
		return
	}

	ans := uint64(1)

	// C(m, n-1)
	for i := m; i > n-1; i-- {
		ans *= uint64(i)
		ans %= mod
	}
	for i := m - (n - 1); i > 1; i-- {
		ans *= inv(i)
		ans %= mod
	}

	// * 2^(n-3)
	ans *= binpow(2, n-3)
	ans %= mod

	// * (n-2)
	ans *= n - 2
	ans %= mod

	fmt.Println(ans)
}


package main
import "fmt"
import "bufio"
import "os"
import "sort"

var input *bufio.Reader

const N = 200005

type arrs []int

func (arr arrs) Len() int{
	return len(arr)
}

func (arr arrs) Less(i, j int) bool {
	return arr[i] < arr[j]
}

func (arr arrs) Swap(i, j int) {
	arr[i], arr[j] = arr[j], arr[i]
}

func main(){
	input = bufio.NewReader(os.Stdin)

	var k,n int
	fmt.Fscanf(input, "%d%d\n", &n, &k)

	arr := make([]arrs, N)
	for i:=0; i<n; i++ {
		var x int
		fmt.Fscanf(input, "%d", &x)
		for cnt:=0; x>=0; x/=2 {
			arr[x] = append(arr[x], cnt)
			cnt++
			if x==0 {
				break
			}
		}
	}

	ans := n*30
	for i:=0; i<N; i++ {
		if len(arr[i])<k {
			continue
		}
		sort.Sort(arr[i])
		cnt := 0
		for j:=0; j<k; j++ {
			cnt += arr[i][j]
		}
		if cnt<ans {
			ans = cnt
		}
	}

	fmt.Println(ans)
}


package main

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

/* solution */

type nodeType struct {
	next [2]*nodeType
	// count of digits need to be removed
	// ...from the end of binary value (count of divisions by 2)
	// ...to make an added value equal to the current
	cuts [20]int
	cnt  int
}

func solve() {

	n, k := readInt(), readInt()
	root := &nodeType{}

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

		v := readInt()

		digits := make([]int, 0)
		for v > 0 {
			// reversed binary representation of the value
			digits = append(digits, v%2)
			v = v / 2
		}

		addToTree(root, digits, len(digits))

	}

	printInt(search(root, k))

}

func search(node *nodeType, k int) int {

	if node == nil || node.cnt < k {
		return 1000000000 // INF
	}

	s0 := 0
	rem := k - node.cuts[0] // how many equal values do we need more
	for i := 1; rem > 0 && i < 20; i++ {
		if rem > node.cuts[i] {
			s0 += node.cuts[i] * i
			rem -= node.cuts[i]
		} else {
			s0 += rem * i
			rem = 0
		}
	}

	s1, s2 := search(node.next[0], k), search(node.next[1], k)

	return min(s0, min(s1, s2))

}

func addToTree(node *nodeType, digits []int, idx int) {

	node.cnt++
	node.cuts[idx]++

	idx--
	if idx < 0 {
		return
	}

	next := node.next[digits[idx]]
	if next == nil {
		node.next[digits[idx]] = &nodeType{}
		next = node.next[digits[idx]]
	}

	addToTree(next, digits, idx)

}

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

/* stubs */

func main() {

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

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

	reader = bufio.NewScanner(f)

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

	reader.Split(bufio.ScanWords)

	solve()

}

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

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

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

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

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

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

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


package main

import "fmt"

func main() {
    var comb [31][31]int64
    for i := 0; i <= 30; i++ { comb[i][0] = 1 }
    for i := 1; i <= 30; i++ {
        for j := 1; j <= i; j++ {
            comb[i][j] = comb[i-1][j]+comb[i-1][j-1]
        }
    }
    var n,m,t int64
    fmt.Scan(&n,&m,&t)
    ans := int64(0)
    for b := int64(4); b <= n; b++ {
        for g := int64(1); g <= m; g++ {
            if (b+g) == t {
                ans += comb[n][b]*comb[m][g]
            }
        }
    }
    fmt.Println(ans)
}


// 131C-mic_rizal
package main

import (
    "fmt"
)

func c(n, r int64) int64 {
    var i int64
    if r > n {
        return 0
    }
    a := int64(1)
    for i = r + 1; i <= n; i++ {
        a *= i
        a /= (i - r)
    }
    return a
}

func main() {
    var n, m, t, a, i int64
    fmt.Scan(&n, &m, &t)
    for i = 4; i < t; i++ {
        a += c(n, i) * c(m, t-i)
    }
    fmt.Println(a)
}


// 131C
package main

import (
	"fmt"
)

func c(n int64, k int64) int64 {
	var i, r int64
	r = 1
	for i = 1; i <= k; i++ {
		r = r * (n - k + i)
		r = r / i
	}
	return r
}

func main() {
	var i, n, m, t, tot int64
	tot = 0
	fmt.Scan(&n, &m, &t)
	for i = 4; i < t; i++ {
		tot = tot + c(n, i)*c(m, t-i)
	}
	fmt.Println(tot)
}


package main

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

func main(){
	var n, m, t int
	r := bufio.NewScanner(os.Stdin)
	r.Split(bufio.ScanWords)
	w := bufio.NewWriter(os.Stdout)
	r.Scan()
	n, _ = strconv.Atoi(r.Text())
	r.Scan()
	m, _ = strconv.Atoi(r.Text())
	r.Scan()
	t, _ = strconv.Atoi(r.Text())
	pa1, pa2, num := 0, 0, 0
	for i:=4; i<t; i++ {
		pa1 = 1
		pa2 = 1
		for j:=1; j<=i; j++ {
			pa1 *= (n - i + j)
			pa1 /= j
		}
		for j:=1; j<=t-i; j++ {
			pa2 *= (m - (t-i)+j)
			pa2 /= j
		}
		num += pa1 * pa2
	}
	w.WriteString(strconv.Itoa(num)+"\n")
	w.Flush()
}


package main

import (
	"fmt"
)

func build_tree() [][]uint64 {
	output := make([][]uint64, 35)
	for i:=0; i<=30; i++ {
		t := make([]uint64, 35)
		t[0]=1
		for j:=1; j<=i; j++ {
			t[j] = output[i-1][j] + output[i-1][j-1]
		}
		output[i] = t
	}
	return output
}

func main() {
	tree := build_tree()
	var n, m, t int
	var ans uint64
	fmt.Scan(&n, &m, &t)
	for i:=4; i<=n; i++ {
		if t-i < 1 {continue}
		ans += tree[n][i] * tree[m][t-i]
	}
	fmt.Println(ans)
}


package main

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

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

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

	s, k := int64(scanInt(scanner)), scanInt(scanner)
	f := []int64{1}
	for f[len(f)-1] < s {
		x, count := int64(0), 0
		for i := len(f)-1; i != -1 && count != k; i-- {
			x += f[i]
			count++
		}
		f = append(f, x)
	}
	result := []int64{}
	pos := len(f)-1
	for s != 0 {
		for f[pos] > s {
			pos--
		}
		result = append(result, f[pos])
		s -= f[pos]
	}
	writer.WriteString(fmt.Sprintf("%d\n%d", len(result), result[0]))
	for i := 1; i != len(result); i++ {
		writer.WriteString(fmt.Sprintf(" %d", result[i]))
	}
	writer.WriteString("\n")
}


package main

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

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

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

	s, k := int64(scanInt(scanner)), scanInt(scanner)
	f := []int64{1}
	for f[len(f)-1] < s {
		x, count := int64(0), 0
		for i := len(f)-1; i != -1 && count != k; i-- {
			x += f[i]
			count++
		}
		f = append(f, x)
	}
	result := []int64{}
	pos := len(f)-1
	for s != 0 {
		for f[pos] > s {
			pos--
		}
		result = append(result, f[pos])
		s -= f[pos]
	}
	writer.WriteString(fmt.Sprintf("%d\n0", len(result)))
	for i := 0; i != len(result); i++ {
		writer.WriteString(fmt.Sprintf(" %d", result[i]))
	}
	writer.WriteString("\n")
}


package main

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

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

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

	s, k := int64(scanInt(scanner)), scanInt(scanner)
	f := []int64{1}
	for f[len(f)-1] < s {
		x, count := int64(0), 0
		for i := len(f)-1; i != -1 && count != k; i-- {
			x += f[i]
			count++
		}
		f = append(f, x)
	}
	result := []int64{}
	pos := len(f)-1
	for s != 0 {
		for f[pos] > s {
			pos--
		}
		result = append(result, f[pos])
		s -= f[pos]
	}
	writer.WriteString(fmt.Sprintf("%d\n0", len(result)+1))
	for i := 0; i != len(result); i++ {
		writer.WriteString(fmt.Sprintf(" %d", result[i]))
	}
	writer.WriteString("\n")
}


package main

import "fmt"

var mod int64 = 1000000007

func main() {
    var n, m, k int64
    fmt.Scan(&n)
    fmt.Scan(&m)
    fmt.Scan(&k)
    if k > n {
        fmt.Println(pow(m, n))
    } else if k == n {
        fmt.Println(pow(m, (n + 1) / 2))
    } else if k == 1 {
        fmt.Println(pow(m, n))
    } else if k % 2 == 0 {
        fmt.Println(m)
    } else if k % 1 == 0 {
        fmt.Println(pow(m, 2))
    }
    return
}

func pow(int64 a, int64 b) int64 {
    var ans int64 = 1
    for; b > 0; b-- {
        ans = ans * a % mod
    }
    return ans
}


package main

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

var DEBUG = true

func main() {
	defer Flush()

	h := readi()
	w := readi()

	x := (h - 1) + (w - 1)
	ans := 4
	p := INF3
	for i := 0; i < x; i++ {
		ans = ans * 2 % p
	}
	println(ans)

}

// -----------------------------------------------------------------------------

// IO helper functions

// Returns next token from input.  It must be initialized by SetInput()
// before the first call.
var nextToken func() ([]byte, error)
var nextLine func() ([]byte, error)

// Holds a buffer for output.  It must be initialized by SetOutput().
// All IO fucntions (read*() and [e]print*()) should write to OutputWriter
// instead of this.
var OutputBuffer *bufio.Writer

// Holds an io.Writer.  It must be initialized by SetOutput()
var OutputWriter io.Writer

// Set IO functions for interactive input/output.
func SetInteractive(w io.Writer, r io.Reader) {
	SetUnbefferedInput(r)
	OutputBuffer = nil
	OutputWriter = w
}

// Setup OutputBuffer and OutputWriter.
func SetOutput(w io.Writer) {
	OutputBuffer = bufio.NewWriter(w)
	OutputWriter = OutputBuffer
}

// Flushes OutputBuffer
func Flush() {
	if OutputBuffer != nil {
		OutputBuffer.Flush()
	}
}

// Returns true if c is a white space
func IsSpace(c byte) bool {
	switch c {
	case '\t', '\n', '\v', '\f', '\r', ' ':
		return true
	}
	return false
}

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

// Setup nextToken with input buffer.
func SetInput(r io.Reader) {
	buf := new(bytes.Buffer)
	var b []byte

	var i int
	rest := func() ([]byte, error) {
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		return b[j:i], nil
	}
	initial := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextToken = rest
		return rest()
	}
	nextToken = initial

	restLn := func() ([]byte, error) {
		for i < len(b) && IsNewLine(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsNewLine(b[i]) {
			i++
		}
		return b[j:i], nil
	}

	initialLn := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextLine = restLn
		return restLn()
	}
	nextLine = initialLn
}

// Setup nextToken without input buffer.
func SetUnbefferedInput(r io.Reader) {
	buf := bufio.NewReader(r)
	var b []byte

	var i int
	nextToken = func() ([]byte, error) {
		var err error
		if i == len(b) {
			b, err = buf.ReadBytes('\n')
			if err != nil {
				return nil, err
			}
			i = 0
			j := len(b) - 1
			for 0 <= j && IsSpace(b[j]) {
				j--
			}
			b = b[0 : j+1]
		}
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		if i == j {
			return nil, io.ErrUnexpectedEOF
		}
		return b[j:i], nil
	}
}

// -----------------------------------------------------------------------------

// IO functions

// Reads next token and return it as []byte
func readb() []byte {
	b, err := nextToken()
	if err != nil {
		panic(err)
	}
	return b[:len(b):len(b)]
}

// Reads next token and return it as string
func reads() string {
	return string(readb())
}

// Read next line as []byte.  Trailing '\n' will not be included.
// See also comments on readb()
func readbln() []byte {
	b, err := nextLine()
	if err != nil {
		panic(err)
	}
	return b[:len(b):len(b)]
}

// Read next line as string
func readsln() string {
	return string(readbln())
}

// Reads next token and return it as int64
func readll() int64 {
	i, err := strconv.ParseInt(reads(), 10, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// Reads next token and return it as int
func readi() int {
	return int(readll())
}

// Reads next token and return it as float64
func readf() float64 {
	f, err := strconv.ParseFloat(reads(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// Write args to OutputWriter with the format f
func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(OutputWriter, f, args...)
}

// Write args to OutputWriter without format
func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(OutputWriter, args...)
}

// Write args to stderr with the format f
func eprintf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(os.Stderr, f, args...)
}

// Write args to stderr without format
func eprintln(args ...interface{}) (int, error) {
	return fmt.Fprintln(os.Stderr, args...)
}

func dbgf(f string, args ...interface{}) {
	if !DEBUG {
		return
	}
	fmt.Fprintf(os.Stderr, f, args...)
}

func dbg(args ...interface{}) {
	if !DEBUG {
		return
	}
	fmt.Fprintln(os.Stderr, args...)
}

// -----------------------------------------------------------------------------

// Utilities

func sumSlice(a []int) int {
	var res int
	for _, v := range a {
		res += v
	}
	return res
}

func sumSlicell(a []int64) int64 {
	var res int64
	for _, v := range a {
		res += v
	}
	return res
}

func readInts(N int) (int, []int) {
	if N == 0 {
		N = readi()
	}
	a := make([]int, N)
	for i := range a {
		a[i] = readi()
	}
	return N, a
}

func readIntsll(N int) (int, []int64) {
	if N == 0 {
		N = readi()
	}
	a := make([]int64, N)
	for i := range a {
		a[i] = readll()
	}
	return N, a
}

// -----------------------------------------------------------------------------

// Simple math functions

const (
	// big prime
	INF  = 1000000007
	INF2 = 1000000009
	INF3 = 998244353
)

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

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

func minf(a, b float64) float64 {
	if a < b {
		return a
	}
	return b
}

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

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

func maxf(a, b float64) float64 {
	if a < b {
		return b
	}
	return a
}

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

func absll(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

func absf(a float64) float64 {
	if a < 0 {
		return -a
	}
	return a
}

// egcd(a, b) returns d, x, y:
//   d is gcd(a,b)
//   x, y are  integers that satisfy ax + by = d
func egcd(a, b int) (int, int, int) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcd(b, a%b)
	return d, y, x - a/b*y
}

func egcdll(a, b int64) (int64, int64, int64) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcdll(b, a%b)
	return d, y, x - a/b*y
}

func gcd(a, b int) int {
	d, _, _ := egcd(a, b)
	return d
}

func gcdll(a, b int64) int64 {
	d, _, _ := egcdll(a, b)
	return d
}

// set up IO functions
func init() {
	// for non-interactive
	SetInput(os.Stdin)
	SetOutput(os.Stdout)

	// Enable below when interactive.  Its ok to leave above intact.
	// SetInteractive(os.Stdout, os.Stdin)
}


package main

import (
	"fmt"
)

func main() {
	var n int;
	fmt.Scanf("%d",&n)
	a := make([]int,50)
	var i int
	var tmp string
	for i = 0;i < n;i++ {
		for {
			fmt.Scanf("%s",&tmp)
			if tmp == "" {
				continue
			}
			if tmp != "\n" {
				a[i] = (int)(tmp[0])
				tmp = ""
				break;
			}
		}
	}

	var flag bool = false;
	for i  = 1;i < n;i++ {
		if(a[i] - a[i-1] >= 2 || a[i] - a[i-1] <= -2 ){
			flag = true;
			break;
		}
	}
	if flag {
		fmt.Println("NO");
	}else {
		fmt.Println("YES");
	}

}


package main

import "fmt"

func main() {
	var n int;
	fmt.Scanf("%d",&n)
	a := make([]int,50)
	var i int;
	for i = 0;i < n;i++ {
		fmt.Scanf("%d",&a[i]);
	}
	var flag bool = false;
	for i  = 1;i < n;i++{
		if(a[i] - a[i-1] >= 2){
			flag = true;
			break;
		}
	}
	if flag {
		fmt.Println("NO");
	}else {
		fmt.Println("YES");
	}

}


package main

import "fmt"

func main() {
	var n int;
	fmt.Scanf("%d",&n)
	a := make([]int,50)
	var i int;
	for i = 0;i < n;i++ {
		fmt.Scanf("%d",&a[i]);
	}
	var flag bool = false;
	for i  = 1;i < n;i++{
		if(a[i] - a[i-1] >= 2 || a[i] - a[i-1] <= -2 ){
			flag = true;
			break;
		}
	}
	if flag {
		fmt.Println("NO");
	}else {
		fmt.Println("YES");
	}

}


package main

import (
	"fmt"
	"strconv"
)

func main() {
	var n int;
	fmt.Scanf("%d",&n)
	a := make([]int,50)
	var i int
	var tmp string

	for i = 0;i < n;i++ {
		for {
			fmt.Scanf("%s",&tmp)
			if tmp == "" {
				continue
			}
			if tmp != "\n" {
				a[i] , _= strconv.Atoi(tmp)
				tmp = ""
				//fmt.Println(a[i])
				break;
			}
		}
	}

	var flag bool = false;
	for i = 1;i < n;i++ {
		if(a[i] - a[i-1] >= 2 || a[i] - a[i-1] <= -2 ){

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

}


package main

import (
	"fmt"
)

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

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

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


package main

import (
	"fmt"
)

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

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

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


package main

import (
	"fmt"
)

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

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

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


package main

import (
	"fmt"
)

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

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

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


package main

import "fmt"

func main() {
	var n, k int64
	fmt.Scanln(&n, &k)
	lo, hi := int64(0), k
	for lo <= hi {
		x := (lo + hi) >> 1
		if (k+k-x-1)*x/2+1 >= n {
			hi = x - 1
		} else {
			lo = x + 1
		}
	}
	if lo < k {
		fmt.Println(lo)
	} else {
		fmt.Println(-1)
	}
}


package main

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

func main() {
	// defer func(start time.Time) {
	// 	fmt.Println(time.Since(start))
	// }(time.Now())

	reader := bufio.NewReader(os.Stdin)

	var s string
	fmt.Fscan(reader, &s)
	var c uint8
	var index, count int

	// fmt.Println(s)
	for i:=0; i<len(s); i++ {
		c = s[i]
		index = 0
		for i++; i<len(s) && c==s[i]; i++ {
			index++
			// fmt.Printf("%c %d\n", s[i], i)
		}
		if index%2==1 {
			// fmt.Printf("count++ %c %d\n", c, index)
			count++
		}
		i--
	}

	fmt.Println(count)
}


//http://codeforces.com/problemset/problem/391/A
//A. Genetic Engineering
// az osszes futamot figyelni kell

package main

import (
	"fmt"
)

func main() {
	var (
		nd, i, run, ans int32
		d               string
		prev, akt       byte
	)

	fmt.Scan(&d)
	nd = int32(len(d))

	//	fmt.Println(d, nd)

	prev, run = d[0], 1

	for i = 1; i < nd; i++ {
		akt = d[i]
		if prev == akt {
			run++
		} else {
			if 0 == (run % 2) {
				ans++
			}
			prev = akt
			run = 1
		}
	}
	if 0 == (run % 2) {
		ans++
	}

	fmt.Println(ans)

}


package main

import (
    "fmt"
    "strconv"
)

type pos struct{
    x int
    y int
}

func mark_rock(board *[9][9]int, pos_r pos){
    for i:=pos_r.x+1; i<=8; i++{
        if board[i][pos_r.y] < 2 {
            board[i][pos_r.y] = 1
        }else{
            break
        }
    }
    for i:=pos_r.x-1; i>=1; i--{
        if board[i][pos_r.y] < 2 {
            board[i][pos_r.y] = 1
        }else{
            break
        }
    }
    for j:=pos_r.y+1; j<=8; j++{
        if board[pos_r.x][j] < 2 {
            board[pos_r.x][j] = 1
        }else{
            break
        }
    }
    for j:=pos_r.y-1; j>=1; j--{
        if board[pos_r.x][j] < 2 {
            board[pos_r.x][j] = 1
        }else{
            break
        }
    }
}

func is_valid(x int, y int) bool{
    if x>=1 && x<=8{
        return y>=1 && y<=8
    }
    return false
}

var move_x = [3]int{-1, 0, 1}
var move_y  = [3]int{-1, 0, 1}

func mark_king(board *[9][9]int, pos_k pos){
    for i:=0; i<3; i++{
        for j:=0; j<3; j++{
            x:= pos_k.x+move_x[i]
            y:= pos_k.y+move_y[j]
            if !is_valid(x,y){
                continue
            }
            if board[x][y] >=2{
                continue
            }
            board[x][y] = 1
        }
    }
}

func Result(bk pos, board [9][9]int) string{
    for i:= 0; i<3; i++{
        for j:=0; j<3; j++{
            x:= bk.x + move_x[i]
            y:= bk.y + move_y[j]
            if x==0 && y==0{
                continue
            }
            if !is_valid(x,y){
                continue
            }
            if board[x][y] == 2{
                return "OTHER"
            }
            if board[x][y] == 0{
                return "OTHER"
            }
        }
    }
    return "CHECKMATE"
}

func main(){
    chess := map[string]pos{}
    toi := [9]byte{'a','b', 'c', 'd', 'e', 'f', 'g', 'h'}
    for k, letter := range toi{
        for j:=1; j<=8; j++{
            chess[string(letter) + strconv.Itoa(j)] = pos{k+1, j}
        }
    }
    board := [9][9]int{}
    var wr, wr2, wk, bk string
    fmt.Scanf("%s %s %s %s", &wr, &wr2, &wk, &bk)
    pos_wr, _ := chess[wr]
    board[pos_wr.x][pos_wr.y] = 2 //rock
    pos_wr2, _ := chess[wr2]
    board[pos_wr2.x][pos_wr2.y] = 2 //rock
    pos_wking, _ := chess[wk]
    board[pos_wking.x][pos_wking.y] = 3 //white king
    pos_bking, _ := chess[bk]
    mark_rock(&board, pos_wr)
    mark_rock(&board, pos_wr2)
    mark_king(&board, pos_wking)
    //show(board)
    fmt.Println(Result(pos_bking, board))
}

func show(board [9][9]int){
    for i:=1; i<=8; i++{
        for j:=1; j<=8; j++{
            fmt.Printf("%d,%d:%v ", i, j, board[i][j])
        }
        fmt.Printf("\n")
    }
    fmt.Println("---------------")
}


package main

import (
    "fmt"
    "strconv"
)

type pos struct{
    x int
    y int
}

func mark_rock(board *[9][9]int, pos_r pos){
    for i:=pos_r.x+1; i<=8; i++{
        if board[i][pos_r.y] < 2 {
            board[i][pos_r.y] = 1
        }else{
            break
        }
    }
    for i:=pos_r.x-1; i>=1; i--{
        if board[i][pos_r.y] < 2 {
            board[i][pos_r.y] = 1
        }else{
            break
        }
    }
    for j:=pos_r.y+1; j<=8; j++{
        if board[pos_r.x][j] < 2 {
            board[pos_r.x][j] = 1
        }else{
            break
        }
    }
    for j:=pos_r.y-1; j>=1; j--{
        if board[pos_r.x][j] < 2 {
            board[pos_r.x][j] = 1
        }else{
            break
        }
    }
}

func is_valid(x int, y int) bool{
    if x>=1 && x<=8{
        return y>=1 && y<=8
    }
    return false
}

var move_x = [3]int{-1, 0, 1}
var move_y  = [3]int{-1, 0, 1}

func mark_king(board *[9][9]int, pos_k pos){
    for i:=0; i<3; i++{
        for j:=0; j<3; j++{
            x:= pos_k.x+move_x[i]
            y:= pos_k.y+move_y[j]
            if !is_valid(x,y){
                continue
            }
            if board[x][y] >=2{
                continue
            }
            board[x][y] = 1
        }
    }
}

func kingBlackCanBeat(bk pos, board [9][9]int) bool{
    for i:= 0; i<3; i++{
        for j:=0; j<3; j++{
            x:= bk.x + move_x[i]
            y:= bk.y + move_y[j]
            if !is_valid(x,y){
                continue
            }
            if board[x][y] == 2{
                return true
            }
        }
    }
    return false
}

func main(){
    chess := map[string]pos{}
    toi := [9]byte{'a','b', 'c', 'd', 'e', 'f', 'g', 'h'}
    for k, letter := range toi{
        for j:=1; j<=8; j++{
            chess[string(letter) + strconv.Itoa(j)] = pos{k+1, j}
        }
    }
    board := [9][9]int{}
    var wr, wr2, wk, bk string
    fmt.Scanf("%s %s %s %s", &wr, &wr2, &wk, &bk)
    pos_wr, _ := chess[wr]
    board[pos_wr.x][pos_wr.y] = 2 //rock
    pos_wr2, _ := chess[wr2]
    board[pos_wr2.x][pos_wr2.y] = 2 //rock
    pos_wking, _ := chess[wk]
    board[pos_wking.x][pos_wking.y] = 3 //white king
    pos_bking, _ := chess[bk]
    mark_rock(&board, pos_wr)
    mark_rock(&board, pos_wr2)
    mark_king(&board, pos_wking)
    //show(board)
    result := "OTHER"
    if board[pos_bking.x][pos_bking.y] != 0 {
        result = "CHECKMATE"
    }
    if kingBlackCanBeat(pos_bking, board){
        result = "OTHER"
    }
    fmt.Println(result)
}

func show(board [9][9]int){
    for i:=1; i<=8; i++{
        for j:=1; j<=8; j++{
            fmt.Printf("%d,%d:%v ", i, j, board[i][j])
        }
        fmt.Printf("\n")
    }
    fmt.Println("---------------")
}


package main

import (
    "fmt"
    "strconv"
)

type pos struct{
    x int
    y int
}

var whites = [9][9]int{}

func mark_rock(board *[9][9]int, pos_r pos){
    for i:=pos_r.x+1; i<=8; i++{
        board[i][pos_r.y] += 1
        if whites[i][pos_r.y] != 0{
            break
        }
    }
    for i:=pos_r.x-1; i>=1; i--{
        board[i][pos_r.y] += 1
        if whites[i][pos_r.y] != 0{
            break
        }
    }
    for j:=pos_r.y+1; j<=8; j++{
        board[pos_r.x][j] += 1
        if whites[pos_r.x][j] != 0{
            break
        }
    }
    for j:=pos_r.y-1; j>=1; j--{
        board[pos_r.x][j] += 1
        if whites[pos_r.x][j] != 0{
            break
        }
    }
}

func is_valid(x int, y int) bool{
    if x>=1 && x<=8{
        return y>=1 && y<=8
    }
    return false
}

var move_x = [3]int{-1, 0, 1}
var move_y  = [3]int{-1, 0, 1}

func mark_king(board *[9][9]int, pos_k pos){
    for i:=0; i<3; i++{
        for j:=0; j<3; j++{
            x:= pos_k.x+move_x[i]
            y:= pos_k.y+move_y[j]
            if !is_valid(x,y){
                continue
            }
            board[x][y] += 1
        }
    }
}

func Result(wr1 pos, wr2 pos, bk pos, board [9][9]int) string{
    for i:= 0; i<3; i++{
        for j:=0; j<3; j++{
            x:= bk.x + move_x[i]
            y:= bk.y + move_y[j]
            if x==0 && y==0{
                continue
            }
            if !is_valid(x,y){
                continue
            }
            if board[x][y] == 0{
                return "OTHER"
            }
            if board[x][y] == 1 && whites[x][y] == 1{
                return "OTHER"
            }
        }
    }
    return "CHECKMATE"
}

func main(){
    chess := map[string]pos{}
    toi := [8]byte{'a','b', 'c', 'd', 'e', 'f', 'g', 'h'}
    for k, letter := range toi{
        for j:=1; j<=8; j++{
            chess[string(letter) + strconv.Itoa(j)] = pos{k+1, j}
            whites[k+1][j] = 0
        }
    }
    board := [9][9]int{}
    var wr, wr2, wk, bk string
    fmt.Scanf("%s %s %s %s", &wr, &wr2, &wk, &bk)
    pos_wr, _ := chess[wr]
    board[pos_wr.x][pos_wr.y] = 1 //rock
    whites[pos_wr.x][pos_wr.y] = 1 //rock
    pos_wr2, _ := chess[wr2]
    board[pos_wr2.x][pos_wr2.y] = 1 //rock
    whites[pos_wr2.x][pos_wr2.y] = 1 //rock
    pos_wking, _ := chess[wk]
    board[pos_wking.x][pos_wking.y] = 1 //white king
    whites[pos_wking.x][pos_wking.y] = 2  //white king
    pos_bking, _ := chess[bk]

    mark_rock(&board, pos_wr)
    mark_rock(&board, pos_wr2)
    mark_king(&board, pos_wking)
    //show(board)
    fmt.Println(Result(pos_wr, pos_wr2, pos_bking, board))
}

func show(board [9][9]int){
    for i:=1; i<=8; i++{
        for j:=1; j<=8; j++{
            fmt.Printf("%d,%d:%v ", i, j, board[i][j])
        }
        fmt.Printf("\n")
    }
    fmt.Println("---------------")
}


package main

import (
	"bufio"
	"os"
	"strconv"
	"time"
	"unicode/utf8"
)

var w *bufio.Writer

var sc *bufio.Scanner

const minus, zero byte = '-', '0'

func nextInt() int {
	var ans, fst int = 0, 0
	var neg bool = false
	sc.Scan()
	if sc.Bytes()[0] == minus {
		fst = 1
		neg = true
	}
	for _, j := range sc.Bytes()[fst:] {
		ans = ans*10 + int(j-zero)
	}
	if neg == true {
		ans = -ans
	}
	return ans
}

func printInt(n int) {
	w.WriteString(strconv.Itoa(n) + " ")
}

//two functions from go source:
func isSpace(r rune) bool {
	if r <= '\u00FF' {
		// Obvious ASCII ones: \t through \r plus space. Plus two Latin-1 oddballs.
		switch r {
		case ' ', '\t', '\n', '\v', '\f', '\r', ':':
			return true
		case '\u0085', '\u00A0':
			return true
		}
		return false
	}
	// High-valued ones.
	if '\u2000' <= r && r <= '\u200a' {
		return true
	}
	switch r {
	case '\u1680', '\u180e', '\u2028', '\u2029', '\u202f', '\u205f', '\u3000':
		return true
	}
	return false
}

func ScanWords(data []byte, atEOF bool) (advance int, token []byte, err error) {
	// Skip leading spaces.
	start := 0
	for width := 0; start < len(data); start += width {
		var r rune
		r, width = utf8.DecodeRune(data[start:])
		if !isSpace(r) {
			break
		}
	}
	if atEOF && len(data) == 0 {
		return 0, nil, nil
	}
	// Scan until space, marking end of word.
	for width, i := 0, start; i < len(data); i += width {
		var r rune
		r, width = utf8.DecodeRune(data[i:])
		if isSpace(r) {
			return i + width, data[start:i], nil
		}
	}
	// If we're at EOF, we have a final, non-empty, non-terminated word. Return it.
	if atEOF && len(data) > start {
		return len(data), data[start:], nil
	}
	// Request more data.
	return 0, nil, nil
}

func main() {

	w = bufio.NewWriter(os.Stdout)
	sc = bufio.NewScanner(os.Stdin)
	sc.Split(ScanWords)
	tyme1, tyme2 := time.Date(nextInt(), time.Month(nextInt()), nextInt(), 0, 0, 0, 0, time.UTC),
		time.Date(nextInt(), time.Month(nextInt()), nextInt(), 0, 0, 0, 0, time.UTC)
	ans := int(tyme2.Sub(tyme1).Hours() / 24)
	if ans < 0 {
		ans = -ans
	}
	printInt(ans)
	w.Flush()
	//YOU FORGOT TO FLUSH!
}


package main

import "fmt"
import "os"

import "strconv"
import "strings"

func L(n int) int {
	if n==0 { return 0 }
	var P=make([]int, n+1)
	var C=make([]int, 10)

	for i:=0; i < 10; i++ { P[i]=1 }
	for i:=10; i <= n; i++ {
		m:=cyfry(i, C)
		min:=-1
		for j:=0; j < m; j++ {
			if C[j] > 0 {
				if min < 0 {
					min=P[i-C[j]]
				} else {
					if P[i-C[j]] < min {
						min=P[i-C[j]]
					}
				}
			}
		}
		P[i]=min+1
	}
	return P[n]
}

func cyfry(n int, c []int) int {
	var i int
	for i=0; n > 0; i++ {
		c[i]=n%10
		n/=10
	}
	return i
}

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

func main() {
	b:=make([]byte, 20)
	max, _:=os.Stdin.Read(b)
	s:=strings.TrimRight(string(b)[0:max], "\r\n")
	n, _:=strconv.Atoi(s)
	fmt.Print(L(n))
}


package main

import "fmt"
import "os"

import "strconv"
import "strings"

func L(n int) int {
	var P=make([]int, n+1)
	var C=make([]int, 10)

	for i:=0; i < 10; i++ { P[i]=1 }
	for i:=10; i <= n; i++ {
		m:=cyfry(i, C)
		min:=-1
		for j:=0; j < m; j++ {
			if C[j] > 0 {
				if min < 0 {
					min=P[i-C[j]]
				} else {
					if P[i-C[j]] < min {
						min=P[i-C[j]]
					}
				}
			}
		}
		P[i]=min+1
	}
	return P[n]
}

func cyfry(n int, c []int) int {
	var i int
	for i=0; n > 0; i++ {
		c[i]=n%10
		n/=10
	}
	return i
}

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

func main() {
	b:=make([]byte, 20)
	max, _:=os.Stdin.Read(b)
	s:=strings.TrimRight(string(b)[0:max], "\r\n")
	n, _:=strconv.Atoi(s)
	fmt.Print(L(n))
}


package main

import "fmt"
import "os"

import "strconv"
import "strings"

func L(n int) int {
	if n==0 { return 0 }
	if n < 10 { return 1 }

	var P=make([]int, n+1)
	var C=make([]int, 10)

	for i:=0; i < 10; i++ { P[i]=1 }
	for i:=10; i <= n; i++ {
		m:=cyfry(i, C)
		min:=-1
		for j:=0; j < m; j++ {
			if C[j] > 0 {
				if min < 0 {
					min=P[i-C[j]]
				} else {
					if P[i-C[j]] < min {
						min=P[i-C[j]]
					}
				}
			}
		}
		P[i]=min+1
	}
	return P[n]
}

func cyfry(n int, c []int) int {
	var i int
	for i=0; n > 0; i++ {
		c[i]=n%10
		n/=10
	}
	return i
}

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

func main() {
	b:=make([]byte, 20)
	max, _:=os.Stdin.Read(b)
	s:=strings.TrimRight(string(b)[0:max], "\r\n")
	n, _:=strconv.Atoi(s)
	fmt.Print(L(n))
}


// Codeforces 635 E, with podskazki, done
package main

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

func miconv(s string) int64 {
    iret,err := strconv.ParseInt(s, 10, 64)
    if err != nil {
        fmt.Println("error in converting " + s)
    }
    return iret
}

var x int64
var pov int64

func main() {
    // reading n
    in    := bufio.NewReader(os.Stdin)
    s,err := in.ReadString('\n')
    if err != nil {
        fmt.Println("first read failure", err)
    }
    ss := strings.Split(strings.Trim(s," \n\r")," ")
    x = miconv(ss[0])

    if x > 0 {
        x = x % 360
    } else {
        x = -(-x % 360)
        x = (x + 360) % 360
    }
    // fmt.Printf("converted x = %d\n", x)

    if x<=45 {
        pov = 0
    } else if x<=135 {
        pov = 1
    } else if x<=225 {
        pov = 2
    } else if x>=315 {
        pov = 0
    } else {
        pov = 3
    }

	// print result
	fmt.Printf("%d\n", pov)
}


// Codeforces 635 E, with podskazki, done
package main

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

func miconv(s string) int64 {
    i,err := strconv.Atoi(s)
    if err != nil {
        fmt.Println("error in converting " + s)
    }
    iret := int64(i)
    return iret
}

var x int64
var pov int64

func main() {
    // reading n
    in    := bufio.NewReader(os.Stdin)
    s,err := in.ReadString('\n')
    if err != nil {
        fmt.Println("first read failure", err)
    }
    ss := strings.Split(strings.Trim(s," \n\r")," ")
    x = miconv(ss[0])

    if x > 0 {
        x = x % 360
    } else {
        x = -(-x % 360)
        x = (x + 360) % 360
    }
    // fmt.Printf("converted x = %d\n", x)

    if x<=45 {
        pov = 0
    } else if x<=135 {
        pov = 1
    } else if x<=225 {
        pov = 2
    } else if x>=315 {
        pov = 0
    } else {
        pov = 3
    }

	// print result
	fmt.Printf("%d\n", pov)
}


package main

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

// github.com/EndlessCheng/codeforces-go
const mod int64 = 1e9 + 7

type matrix [][]int64

func newMatrix(n int) matrix {
	mat := make(matrix, n)
	for i := range mat {
		mat[i] = make([]int64, n)
	}
	return mat
}

func newMatrixI(n int) matrix {
	mat := make(matrix, n)
	for i := range mat {
		mat[i] = make([]int64, n)
		mat[i][i] = 1
	}
	return mat
}

func (a matrix) mul(b matrix) matrix {
	c := newMatrix(len(a))
	for i := range a {
		for j := range b[0] {
			for k, aik := range a[i] {
				c[i][j] += aik * b[k][j] % mod
			}
			c[i][j] %= mod
		}
	}
	return c
}

func (a matrix) pow(k int64) matrix {
	res := newMatrixI(len(a))
	for ; k > 0; k >>= 1 {
		if k&1 == 1 {
			res = res.mul(a)
		}
		a = a.mul(a)
	}
	return res
}

func CF1117D(in io.Reader, out io.Writer) {
	n, m := int64(0), 0
	Fscan(in, &n, &m)
	if n < int64(m) {
		Fprint(out, 1)
		return
	}
	a := newMatrix(m)
	a[0][0] = 1
	a[0][m-1] = 1
	for i := 1; i < m; i++ {
		a[i][i-1] = 1
	}
	Fprint(out, a.pow(n)[0][0])
}

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


package main

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

// github.com/EndlessCheng/codeforces-go
const mod int64 = 1e9 + 7

type matrix [][]int64

func newMatrix(n int) matrix {
	mat := make(matrix, n)
	for i := range mat {
		mat[i] = make([]int64, n)
	}
	return mat
}

func newMatrixI(n int) matrix {
	mat := make(matrix, n)
	for i := range mat {
		mat[i] = make([]int64, n)
		mat[i][i] = 1
	}
	return mat
}

func (a matrix) mul(b matrix) matrix {
	c := newMatrix(len(a))
	for i := range a {
		for j := range b[0] {
			for k, aik := range a[i] {
				c[i][j] += aik * b[k][j] % mod
			}
			c[i][j] %= mod
		}
	}
	return c
}

func (a matrix) pow(k int64) matrix {
	res := newMatrixI(len(a))
	for ; k > 0; k >>= 1 {
		if k&1 == 1 {
			res = res.mul(a)
		}
		a = a.mul(a)
	}
	return res
}

func CF1117D(in io.Reader, out io.Writer) {
	var n, m int64
	Fscan(in, &n, &m)
	if n < m {
		Fprint(out, 1)
		return
	}
	a := newMatrix(int(m))
	a[0][0] = 1
	a[0][m-1] = 1
	a[m-1][0] = 1
	Fprint(out, a.pow(n)[0][0])
}

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


package main

import "fmt"

func main() {
	var a int
	fmt.Scan(&a)
	if a == 1 {
		fmt.Println(1, 1)
		fmt.Println(1)
		return
	}
	fmt.Println(2*(a-1), 2)
	fmt.Println(1, 2)
}


package main

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

func solve() {
	n := readInt()
	const X = 1000001
	prev := make([]int, X)
	for i := 0; i < X; i++ {
		prev[i] = 1
	}
	for i := 2; i <= 10; i++ {
		cur := make([]int, X)
		cur[0] = 1
		for j := 1; j < X; j++ {
			cur[j] = -1
		}
		for j := 1; j < X; j++ {
			if j-i >= 0 && prev[j] != -1 {
				cur[j] = prev[j] + cur[j-i]
			} else {
				cur[j] = prev[j]
			}
			if cur[j] > 1e6 {
				cur[j] = -1
			}
			if cur[j] == n {
				fmt.Println(j, i)
				for k := 1; k <= i; k++ {
					if k > 1 {
						fmt.Printf(" %d", k)
					} else {
						fmt.Printf("%d", k)
					}
				}
				fmt.Println()
				return
			}
		}
		prev = cur
	}
}

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

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

var scanner *bufio.Scanner

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

// IO

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

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

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

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

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


package main

import (
	"fmt"
)

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

	var n, m int = a - 1, 2
	d := []int{1, 2}

	fmt.Printf("%d %d\n", n, m)
	for _, v := range d {
		fmt.Printf("%d ", v)
	}
	fmt.Println()
}


package main

import (
	"fmt"
)

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

	var n, m int = 2 * (a - 1), 2
	d := []int{1, 2}

	fmt.Printf("%d %d\n", n, m)
	for _, v := range d {
		fmt.Printf("%d ", v)
	}
	fmt.Println()
}


package main

import (
	"fmt"
)

func main() {
	var (
		length int
		str   string
	)

	fmt.Scanf("%d\n", &length)
	fmt.Scan(&str)
	pokemons := []string {"vaporeon", "jolteon", "flareon", "espeon", "umbreon", "leafeon", "glaceon", "sylveon"}

	sameLength := make([]string, 0)
	for i := 0; i < len(pokemons); i++ {
		if len(pokemons[i]) == length {
			sameLength = append(sameLength, pokemons[i])

		}
	}

	for j := 0; j < len(sameLength); j++ {
		for i :=  0; i < len(str); i++ {
			if (str[i] == sameLength[j][i] || str[i] == '.') && (i == (len(str) - 1)) {
				fmt.Println(sameLength[j])
				return
			} else if (str[i] != sameLength[j][i]) && (str[i] != '.') {
				break
			}
		}
	}
}


package main

import "fmt"

func main() {
	var (
		length int
		str    string
	)

	fmt.Scanf("%d\n", &length)
	fmt.Scan(&str)
	pokemons := []string{"vaporeon", "jolteon", "flareon", "espeon", "umbreon", "leafeon", "glaceon", "sylveon"}

	for j := 0; j < len(pokemons); j++ {
		if len(pokemons[j]) != length {
			continue
		}
		for i := 0; i < length; i++ {

			if str[i] == pokemons[j][i] || str[i] == '.' {
				if i == (length - 1) {
					fmt.Println(pokemons[j])
					return
				}
			} else {
				break
			}
		}
	}
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)
var wrtr = bufio.NewWriterSize(os.Stdout, 10_000_000)
var rdr = bufio.NewScanner(os.Stdin)
func gs() string  { rdr.Scan(); return rdr.Text() }
func gi() int     { i,e := strconv.Atoi(gs()); if e != nil {panic(e)}; return i }
func gis(n int) []int  { res := make([]int,n); for i:=0;i<n;i++ { res[i] = gi() }; return res }
func ia(m int) []int { return make([]int,m) }
func iai(m int,v int) []int { a := make([]int,m); for i:=0;i<m;i++ { a[i] = v }; return a }
func vecset(a []int, v int) { la := len(a); for i:=0;i<la;i++ { a[i] = v } }
const MOD = 998244353
func main() {
	//f1, _ := os.Create("cpu.prof"); pprof.StartCPUProfile(f1); defer pprof.StopCPUProfile()
	defer wrtr.Flush()
	infn := ""; if infn == "" && len(os.Args) > 1 {	infn = os.Args[1] }
	if infn != "" {	f, e := os.Open(infn); if e != nil { panic(e) }; rdr = bufio.NewScanner(f) }
	rdr.Split(bufio.ScanWords); rdr.Buffer(make([]byte,1024),1_000_000_000)
	// PROGRAM STARTS HERE
	N,M := gi(),gi(); mask := ia(10); for i:=0;i<M;i++ { u,v := gi(),gi(); mask[u] |= 1 << uint(v); mask[v] |= 1 << uint(u) }
	f := ia(520); g := ia(520); f[0] = 1
	for i:=1;i<=N;i++ {
		vecset(g,0)
		for j:=0;j<(1<<9);j++ {
			if f[j] != 0 {
				for k:=0;k<10;k++ {
					if (j >> uint(k)) & 1 == 0 {
						g[(j | ((1<<uint(k))-1)) & mask[k]] += f[j]
						g[(j | ((1<<uint(k))-1)) & mask[k]] %= MOD
					}
				}

			}
		}
		copy(f,g)
	}
	ans := 0
	for i:=0;i<(1<<9);i++ { ans += f[i]; ans %= MOD }
	fmt.Println(ans)
}


package main

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

func solve() {
	n := readInt64()
	l := readInt64() - 1
	r := readInt64() - 1
	if n == 0 {
		fmt.Println(0)
		return
	}
	tmpn := int64(1)
	var req int64
	for tmpn < n {
		tmpn <<= 1
		req = req*2 + 1
	}
	dfs(0, req-1, n, l, r)
	fmt.Println(cnt)
}

var cnt int

func dfs(lo int64, hi int64, val int64, l int64, r int64) {
	if val == 0 {
		return
	}
	if l > hi || lo > r {
		return
	}
	mid := (lo + hi) / 2
	if val%2 == 1 && l <= mid && mid <= r {
		cnt++
	}
	dfs(lo, mid-1, val/2, l, r)
	dfs(mid+1, hi, val/2, l, r)
}

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 max(a, 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"
	"fmt"
	"os"
	"strconv"
)

func solve() {
	n := readInt64()
	l := readInt() - 1
	r := readInt() - 1
	if n == 0 {
		fmt.Println(0)
		return
	}
	tmpn := int64(1)
	req := 0
	for tmpn < n {
		tmpn <<= 1
		req = req*2 + 1
	}
	dfs(0, req-1, n, l, r)
	fmt.Println(cnt)
}

var cnt int

func dfs(lo int, hi int, val int64, l int, r int) {
	if val == 0 {
		return
	}
	if l > hi || lo > r {
		return
	}
	mid := (lo + hi) / 2
	if val%2 == 1 && l <= mid && mid <= r {
		cnt++
	}
	dfs(lo, mid-1, val/2, l, r)
	dfs(mid+1, hi, val/2, l, r)
}

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 max(a, 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"
	"fmt"
	"os"
	"strconv"
)

func solve() {
	n := readInt64()
	l := readInt() - 1
	r := readInt() - 1
	if n == 0 {
		fmt.Println(0)
		return
	}
	tmpn := int64(1)
	req := 0
	for tmpn < n {
		tmpn <<= 1
		req = req*2 + 1
	}
	dfs(0, req-1, n, l, r)
	fmt.Println(cnt)
}

var cnt int

func dfs(lo int, hi int, val int64, l int, r int) {
	if val == 0 {
		return
	}
	mid := (lo + hi) / 2
	if val%2 == 1 && l <= mid && mid <= r {
		cnt++
	}
	dfs(lo, mid-1, val/2, l, r)
	dfs(mid+1, hi, val/2, l, r)
}

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 max(a, 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"
	"io"
	"bufio"
	"os"
)

func get_len(n int64) int64 {
	if n > 1 {
		return 2 * get_len(n/2) + 1
	}
	return n
}

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

func solve(n, l, r int64) int64 {
	var s int64
	if n > 0 {
		k := get_len(n / 2)
		if l < k {
			s += solve(n/2, l, min(r, k - 1))
		}
		if l <= k && k <= r {
			s += n % 2
		}
		if r > k {
			s += solve(n/2, max(l - k - 1, 0), r - k - 1)
		}
		// fmt.Printf("%d %d %d %d\n", n, k, l, r)
	}
	return s
}

func main() {
	cin := NewParser(bufio.NewReaderSize(os.Stdin, 1<<16))
	n := cin.nextInt64()
	l := cin.nextInt64() - 1
	r := cin.nextInt64() - 1
	fmt.Printf("%v", solve(n, l, r))
}

// some io

type ParserReader struct {
	r   io.ByteReader
	err error
	c   byte
}

func NewParser(r io.ByteReader) *ParserReader {
	return &ParserReader{r, nil, 0}
}

func (p *ParserReader) next() error {
	p.c, p.err = p.r.ReadByte()
	return p.err
}

func isDigit(c byte) bool {
	return '0' <= c && c <= '9'
}

func (p *ParserReader) nextUInt64() uint64 {
	for !isDigit(p.c) && p.err == nil {
		p.next()
	}
	var r uint64
	for isDigit(p.c) && p.err == nil {
		r = r*10 + uint64(p.c - '0')
		p.next()
	}
	return r
}

func (p *ParserReader) nextUInt() uint {
	for !isDigit(p.c) && p.err == nil {
		p.next()
	}
	var r uint
	for isDigit(p.c) && p.err == nil {
		r = r*10 + uint(p.c - '0')
		p.next()
	}
	return r
}

func (p *ParserReader) nextInt64() int64 {
	for p.c != '-' && !isDigit(p.c) && p.err == nil {
		p.next()
	}
	var sign bool
	if p.c == '-' {
		sign = true
	}
	r := int64(p.nextUInt64())
	if sign {
		return -r
	}
	return r
}

func (p *ParserReader) nextInt() int {
	for p.c != '-' && !isDigit(p.c) && p.err == nil {
		p.next()
	}
	var sign bool
	if p.c == '-' {
		sign = true
	}
	r := int(p.nextUInt())
	if sign {
		return -r
	}
	return r
}


package main

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

func solve() {
	n := readInt64()
	l := readInt64() - 1
	r := readInt64() - 1
	if n == 0 {
		fmt.Println(0)
		return
	}
	tmpn := int64(1)
	var req int64
	for tmpn <= n {
		tmpn <<= 1
		req = req*2 + 1
	}
	dfs(0, req-1, n, l, r)
	fmt.Println(cnt)
}

var cnt int

func dfs(lo int64, hi int64, val int64, l int64, r int64) {
	if val == 0 {
		return
	}
	if l > hi || lo > r {
		return
	}
	mid := (lo + hi) / 2
	if val%2 == 1 && l <= mid && mid <= r {
		cnt++
	}
	dfs(lo, mid-1, val/2, l, r)
	dfs(mid+1, hi, val/2, l, r)
}

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 max(a, 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 (
  "os"
  "bufio"
  "strconv"
  "fmt"
  "sort"
)

var scanner *bufio.Scanner

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

var writer *bufio.Writer
var best int = -1
var g [][]int
var numRows, numCols int

func permute(i int) {
  if i == numCols {
    xs := make([]int, numRows)
    for i := range g {
      x := 0
      for _, d := range g[i] {
        x = 10*x + d
      }
      xs[i] = x
    }
    sort.Ints(xs)
    diff := xs[numRows-1] - xs[0]
    if best == -1 || diff < best {
      best = diff
    }
  } else {
    permute(i+1)
    for j := i+1; j < numCols; j++ {
      for k := range g {
        g[k][i], g[k][j] = g[k][j], g[k][i]
      }
      permute(i+1)
      for k := range g {
        g[k][i], g[k][j] = g[k][j], g[k][i]
      }
    }
  }
}

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

  numRows, numCols = getI(), getI()
  g = make([][]int, numRows)
  for i := range g {
    s := getS()
    g[i] = make([]int, numCols)
    for j := range g[i] {
      g[i][j] = int(s[j]-'0')
    }
  }
  permute(0)

  writer.WriteString(fmt.Sprintf("%d\n", best))
}


package main

import (
	"fmt"
	"os"
	"io"
	"bufio"
)
var input io.Reader

func main() {
	var n, k int
	input = bufio.NewReader(os.Stdin)
	fmt.Fscanln(input, &n, &k)
	l, r := 0, n
	for l < r {
		mid := l + (r - l) / 2
		d := k
		lines := mid
		for lines < n && mid / d > 0 {
			lines += mid/d
			d *= k
		}
		if lines < n {
			l = mid + 1
		} else {
			r = mid
		}
	}

	fmt.Println(r)
}


package main
import (
	"fmt"
)
func main() {
	var n,k,l,h,m,t,ans,s int
	fmt.Scan(&n,&k)
	l=0
	h=n
	for l<=h {
		m=(l+h)>>1
		t=m
		ans=m
		for t!=0 {
			if t<k {
				break
			}
			t/=k
			ans+=t
		}
		if ans<n {
			l=m+1
		} else {
			h=m-1
			s=m
		}
	}
	fmt.Println(s)
}


package main

import "fmt"

func main(){

	var n int64
	var k int64
	fmt.Scan(&n)
	fmt.Scan(&k)
	var l int64 = 0
	var r int64 = 1000000000
	var good int64 = -1
	for{
		mid := l + (r-l)/2
		cop := mid
		var sum int64 = 0
		for{
			sum += cop
			cop = cop/k
			if cop == 0 {
				break
			}
		}
		if sum >= n {
			good = mid
			r = mid-1
		} else {
			l = mid+1
		}
		if l > r {
			break
		}
	}
	fmt.Print(good,"\n")

}


package main

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

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

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

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

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

		childGet := make([]int, n)

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

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


package main

import (
	"fmt"
)

func main() {
	var n, m, a int
	fmt.Scan(&n)
	fmt.Scan(&m)
	var z, t int
	for i := 0; i < n; i++ {
		fmt.Scan(&a)
		x := (a + m - 1) / m
		if x >= t {
			t = x
			z = i
		}
	}
	fmt.Println(z + 1)
}


package main

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

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

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

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

	maxline, line, pos, a := 0, 0, 0, 0

	for i := 0; i < n; i++ {
		a = nextInt()

		line = a / m

		if a % m > 0 {
			line++
		}

		if line >= maxline {
			maxline = line
			pos = i
		}
	}

	println(pos + 1)
}

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

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

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

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

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

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


package main

import "fmt"

func main() {
	var a, b, year int

	fmt.Scan(&a)
	fmt.Scan(&b)

	for i := 1; a <= b; i++ {
		a = a * 3
		b = b * 2
		year = i
	}
	fmt.Println(year)
}


package main

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

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

	for i := int(math.Sqrt(float64(N))); i >= 1; i-- {
		if N % i == 0 {
			fmt.Println(i, N / i)
			break
		}
	}

}

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 int
	fmt.Scanf("%d", &n)

	var a, b int
	a = -1

	for i:=1; i<=n; i++ {
		if (n%i == 0 && i <= (n/i)) {

			if (a == -1) {
				a = i
				b = n/i
			} else if ((n/i)-i < b-a) {
				a = i
				b = n/i
			}

		}
	}

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


package main

import "fmt"

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

	a := 1
	b := n

	for x := 1; x*x <= n; x++ {
		if n%x == 0 {
			a = x
			b = n / x
		}
	}

	fmt.Println(a, b)
}


package main

import "fmt"

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

	var r, c = 1, n

	for i := 2; i*i <= n; i++ {
		if n%i == 0 {
			r, c = i, n/i
		}
	}

	fmt.Println(r, c)
}


package main

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

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

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

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

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

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

func solve(n int) {
	a := int(math.Sqrt(float64(n)))
	if n == a*a {
		O(a, " ")
		O(a, "\n")
		return
	}
	b := a + 1
	for a*b != n {
		if a*b < n {
			b++
		} else {
			a--
		}
	}
	O(a, " ")
	O(b, "\n")
}


package main

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

func abs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}
func main() {
	r := bufio.NewReader(os.Stdin)
	w := bufio.NewWriter(os.Stdout)
	defer w.Flush()

	var n int
	fmt.Fscan(r, &n)
	a := int(math.Sqrt(float64(n)))
	b := n / a
	for ; b * a != n; {
		a--
		b = n / a
	}
	fmt.Fprintln(w, a, b)
}


package main

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

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

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

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

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

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

func solve(n int) {
	a := int(math.Sqrt(float64(n)))
	b := a
	for a*b != n {
		if a*b < n {
			b++
		} else {
			a--
		}
	}
	O(a, " ")
	O(b, "\n")
}


package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)
	defer writer.Flush()
	var n int64
	fmt.Fscan(reader, &n)
	fmt.Fprintln(writer, n - (n / 2 + n / 3 + n / 5 + n / 7 - n / 6 - n / 10 - n / 14 - n / 15 - n / 21 - n / 35 + n / 30 + n / 42 + n / 70 + n / 105 - n / 210))
}//2020-07-31 13:53:23.706


package main

import (
	"fmt"
)

func main() {
	//input := bufio.NewScanner(os.Stdin)
	var a, b, c, n int
	fmt.Scanf("%d%d%d%d", &a, &b, &c, &n)

	if n-a-b+c < 1 || c > a || c > b || a > n || b > n {
		fmt.Printf("-1\n")
	} else {
		fmt.Printf("%d\n", n-a-b+c)
	}

}