package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)
	notprime := make([]bool, n + 1)
	for i := 2; i < len(notprime); i++ {
		if !notprime[i] {
			for j := i + i; j < len(notprime); j += i {
				notprime[j] = true
			}
		}
	}

	for i := 4; i < n; i++ {
		if notprime[i] && notprime[n-i] {
			fmt.Println(i, n-i)
			break
		}
	}
}

package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)
	switch n % 4 {
	case 0, 2:
		fmt.Println(6, n-6)
	case 1, 3:
		fmt.Println(9, n-9)
	}
}

package main

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

func main() {
	var n int
	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &n)
	if n%2 == 0 {
		fmt.Println(6, n-6)
	} else {
		fmt.Println(9, n-9)
	}
}

package main
import "fmt"

func main(){
	var n int
	fmt.Scanln(&n)
	for i := 4; i <= n/2; i ++ {
		if(isPrime(i) && isPrime(n-i)){
			fmt.Printf("%d %d\n", i, n-i)
			break
		}
	}
}

func isPrime(n int)(flg bool) {
	for i := 2; i <= n/2; i ++ {
		if(n%i == 0){
			flg = true
			return
		}
	}
	return
}

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 := nextInt()
	x, y := 4, n - 4
	for isPrime(x) || isPrime(y) {
		x++
		y--
	}

	println(x, y)
}

func isPrime(n int) bool {
	if n > 3 {
		for i := 2; i * i <= n; i++ {
			if n % i == 0 {
				return false
			}
		}
	}

	return true
}

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

package main

import(
    "fmt"
)

func main(){
    var (
        n int
    )
    fmt.Scan(&n)
    if n%2==0{
        fmt.Println(8,"",n-8)
    }else{
        fmt.Println(9,"",n-9)
    }
}

package main

import ("fmt")

// func calculate(s string, carry int, t int) int {

// 	carry = 1
// 	count := 0
// 	for i:=0;i<t;i++{
// 		if carry==1 && s[i]=='1'{
// 			count++
// 			carry = 1
// 		}
// 		if carry==1 && s[i]=='0'{
// 			count++
// 			carry =0
// 		}
// 	}
// 	return count
// }

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

	if t&1==1{
		fmt.Println(9,t-9)
	}else{
		fmt.Println(4,t-4)
	}
}

package main

import (
	"fmt"
	//"math"
)

func main() {
	const size = 1000001
	compl_nums := make([]bool, size)
	for i := 2; i < size/2+1; i++ {
		if compl_nums[i] == false {
			for j := 2 * i; j < size; j += i {
				compl_nums[j] = true
			}
		}
	}

	var n int
	fmt.Scan(&n)

	for i := 2; i <= n/2; i++ {
		if compl_nums[i] && compl_nums[n-i] {
			fmt.Println(i, n-i)
			break
		}
	}
}

package main

import (
	"fmt"
)

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

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

	for i := 2; i <= n/2; i++ {
		if isCompl(i) && isCompl(n-i) {
			fmt.Println(i, n-i)
			break
		}
	}
}

	package main

   import ("fmt"
		   "math/big")

   func main(){

	   var input int64
	   fmt.Scan(&input)

	   var res1,res2,res3 int64

	   res1=input-4
	   res2=input-8
	   res3=input-6

	   if !(big.NewInt(res1).ProbablyPrime(0)) {
		   fmt.Print(res1,4)
	   }else if !(big.NewInt(res2).ProbablyPrime(0)) {
		fmt.Print(res2,8)
	   }else if !(big.NewInt(res3).ProbablyPrime(0)) {
		fmt.Print(res3,6)
	   }else{
		   fmt.Print(input/2,input/2)
	   }
}

package main

import (
	"fmt"
)

func main() {
var n int
fmt.Scan(&n)
if (n%2==0){
	fmt.Println(8,n-8)
}else{
	fmt.Println(9,n-9)
}
}

package main

import "fmt"

func main() {
	var n uint32
	fmt.Scanf("%d \n", &n)
	if n%3 == 0 {
		fmt.Println(6, n-6)
	}
	if n%3 == 1 {
		fmt.Println(4, n-4)
	}
	if n%3 == 2 {
		fmt.Println(8, n-8)
	}
}

package main

import (
	"fmt"
)

var (
	n    int
	x, y int
)

func in() {
	fmt.Scanln(&n)
}

func out() {
	fmt.Printf("%d %d\n", x, y)
}

func run() {
	if n%2 == 0 {
		x = 4
	} else {
		x = 9
	}
	y = n - x
}

func main() {
	in()
	run()
	out()
}

package main

import (
	"bufio"
	"bytes"
	"errors"
	"io"
	"math/rand"
	"os"
	"strconv"
	"time"
	"unicode/utf8"
)

// ******************************** CODE STARTS ********************************

const ()

var (
)

func solve() {
	n := readInt()
	prime := make([]bool, n + 1)
	for i := 2; i < len(prime); i++ {
		prime[i] = true
	}
	for j := 2; j * j < len(prime); j++ {
		if prime[j] {
			for i := j * j; i < len(prime); i += j {
				prime[i] = false
			}
		}
	}
//	logln(prime)
	for i := 2; i < n; i++ {
		if !prime[i] && !prime[n - i] {
			printInt(i)
			printSpace()
			printInt(n - i)
			printLine()
			break
		}
	}
}

// ********************************* CODE ENDS *********************************

// IO.

var (
	scanner *Scanner
	writer  *bufio.Writer
)

func main() {
	input := os.Stdin
	output := os.Stdout
	//	input, _ := os.Open("")
	//	output, _ := os.Create("")

	defer input.Close()
	defer output.Close()

	scanner = NewScanner(input)
	scanner.Split(bufio.ScanWords)

	writer = bufio.NewWriter(output)
	defer writer.Flush()

	rand.Seed(int64(time.Now().Nanosecond()))
	solve()
}

// Read.

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

func readLine() string {
	scanner.Split(bufio.ScanLines)
	defer scanner.Split(bufio.ScanWords)
	return readString()
}

func readInt() int {
	ans, _ := strconv.ParseInt(readString(), 10, 0)
	return int(ans)
}

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

func readFloat64() float64 {
	ans, _ := strconv.ParseFloat(readString(), 64)
	return ans
}

// Write.

func printString(value string) {
	writer.WriteString(value)
}

func printLine() {
	printString("\n")
}

func printSpace() {
	printString(" ")
}

func printInt(value int) {
	printString(strconv.FormatInt(int64(value), 10))
}

func printInt64(value int64) {
	printString(strconv.FormatInt(value, 10))
}

func printFloat64(value float64) {
	printString(strconv.FormatFloat(value, 'f', 20, 64))
}

// Tuple

type Tuple struct {
	a, b int
}

func (p Tuple) Equals(key Key) bool {
	return p.a == key.(Tuple).a
}

func (p Tuple) Less(key Key) bool {
	return p.a < key.(Tuple).a
}

type TupleSlice []Tuple

func (p TupleSlice) Len() int {
	return len(p)
}

func (p TupleSlice) Less(j, i int) bool {
	return p[j].a < p[i].a
}

func (p TupleSlice) Swap(j, i int) {
	p[j], p[i] = p[i], p[j]
}

// Min, max, abs.

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

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

func absInt(a int) int {
	if a > 0 {
		return a
	} else {
		return -a
	}
}

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

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

func absInt64(a int64) int64 {
	if a > 0 {
		return a
	} else {
		return -a
	}
}

func maxFloat64(a, b float64) float64 {
	if a > b {
		return a
	} else {
		return b
	}
}

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

func absFloat64(a float64) float64 {
	if a > 0 {
		return a
	} else {
		return -a
	}
}

// Set Key interface implementations.

type Int int

func (p Int) Equals(key Key) bool {
	return int(p) == int(key.(Int))
}

func (p Int) Less(key Key) bool {
	return int(p) < int(key.(Int))
}

// Set.

type Key interface {
	Equals(key Key) bool
	Less(key Key) bool
}

type node struct {
	key   Key
	left  *node
	right *node
}

func newNode(key Key) *node {
	return &node{key, nil, nil}
}

type SplayTree struct {
	root *node
	tmp  *node
	len  int
}

func NewSplayTree() *SplayTree {
	return &SplayTree{nil, newNode(nil), 0}
}

func rotateLeft(x, p *node) {
	p.right = x.left
	x.left = p
}

func rotateRight(x, p *node) {
	p.left = x.right
	x.right = p
}

func (p *SplayTree) splay(x *node, key Key) *node {
	if x == nil {
		return nil
	}

	left := p.tmp
	right := p.tmp

	for {
		if key.Less(x.key) {
			y := x.left
			if y == nil {
				break
			}
			if key.Less(y.key) { // zig-zig
				rotateRight(y, x)
				x = y
				if x.left == nil {
					break
				}
			}
			// link right
			right.left = x
			right = x
			// move left
			x = x.left
		} else if x.key.Less(key) {
			y := x.right
			if y == nil {
				break
			}
			if y.key.Less(key) { // zig-zig
				rotateLeft(y, x)
				x = y
				if x.right == nil {
					break
				}
			}
			// link left
			left.right = x
			left = x
			// move right
			x = x.right
		} else {
			break
		}
	}

	left.right = x.left
	right.left = x.right
	x.left = p.tmp.right
	x.right = p.tmp.left

	return x
}

// left <= key < right
func (p *SplayTree) split(key Key) (left, right *node) {
	p.root = p.splay(p.root, key)
	if p.root.key.Equals(key) || p.root.key.Less(key) {
		right := p.root.right
		p.root.right = nil
		return p.root, right
	} else {
		left := p.root.left
		p.root.left = nil
		return left, p.root
	}
}

// keys from left tree must be less then keys from right tree
func (p *SplayTree) join(left, right *node) *node {
	if left == nil {
		return right
	} else if right == nil {
		return left
	}
	left = p.splay(left, right.key)
	left.right = right
	return left
}

type Set interface {
	Len() int
	Insert(key Key) error
	Find(key Key) bool
	Remove(key Key) error
}

func NewSet() Set {
	return Set(NewSplayTree())
}

func (p *SplayTree) Len() int {
	return p.len
}

func (p *SplayTree) Insert(key Key) error {
	if p.root == nil {
		p.root = newNode(key)
		p.len++
	} else {
		p.root = p.splay(p.root, key)
		if p.root.key.Equals(key) {
			return errors.New("Such key already exists")
		} else {
			left, right := p.split(key)
			p.root = newNode(key)
			p.root.left = left
			p.root.right = right
			p.len++
		}
	}
	return nil
}

func (p *SplayTree) Find(key Key) bool {
	if p.root == nil {
		return false
	}
	p.root = p.splay(p.root, key)
	return p.root.key.Equals(key)
}

func (p *SplayTree) Remove(key Key) error {
	p.root = p.splay(p.root, key)
	if p.root == nil || !p.root.key.Equals(key) {
		return errors.New("Such key doesn't exist")
	}
	p.root = p.join(p.split(key))
	return nil
}

// Copied scan.go
// Scanner provides a convenient interface for reading data such as
// a file of newline-delimited lines of text. Successive calls to
// the Scan method will step through the 'tokens' of a file, skipping
// the bytes between the tokens. The specification of a token is
// defined by a split function of type SplitFunc; the default split
// function breaks the input into lines with line termination stripped. Split
// functions are defined in this package for scanning a file into
// lines, bytes, UTF-8-encoded runes, and space-delimited words. The
// client may instead provide a custom split function.
//
// Scanning stops unrecoverably at EOF, the first I/O error, or a token too
// large to fit in the buffer. When a scan stops, the reader may have
// advanced arbitrarily far past the last token. Programs that need more
// control over error handling or large tokens, or must run sequential scans
// on a reader, should use bufio.Reader instead.
//
type Scanner struct {
	r            io.Reader // The reader provided by the client.
	split        SplitFunc // The function to split the tokens.
	maxTokenSize int       // Maximum size of a token; modified by tests.
	token        []byte    // Last token returned by split.
	buf          []byte    // Buffer used as argument to split.
	start        int       // First non-processed byte in buf.
	end          int       // End of data in buf.
	err          error     // Sticky error.
}

// SplitFunc is the signature of the split function used to tokenize the
// input. The arguments are an initial substring of the remaining unprocessed
// data and a flag, atEOF, that reports whether the Reader has no more data
// to give. The return values are the number of bytes to advance the input
// and the next token to return to the user, plus an error, if any. If the
// data does not yet hold a complete token, for instance if it has no newline
// while scanning lines, SplitFunc can return (0, nil, nil) to signal the
// Scanner to read more data into the slice and try again with a longer slice
// starting at the same point in the input.
//
// If the returned error is non-nil, scanning stops and the error
// is returned to the client.
//
// The function is never called with an empty data slice unless atEOF
// is true. If atEOF is true, however, data may be non-empty and,
// as always, holds unprocessed text.
type SplitFunc func(data []byte, atEOF bool) (advance int, token []byte, err error)

// Errors returned by Scanner.
var (
	ErrTooLong         = errors.New("bufio.Scanner: token too long")
	ErrNegativeAdvance = errors.New("bufio.Scanner: SplitFunc returns negative advance count")
	ErrAdvanceTooFar   = errors.New("bufio.Scanner: SplitFunc returns advance count beyond input")
)

const (
	// Maximum size used to buffer a token. The actual maximum token size
	// may be smaller as the buffer may need to include, for instance, a newline.
	MaxScanTokenSize = 1 << 20
)

// NewScanner returns a new Scanner to read from r.
// The split function defaults to ScanLines.
func NewScanner(r io.Reader) *Scanner {
	return &Scanner{
		r:            r,
		split:        ScanLines,
		maxTokenSize: MaxScanTokenSize,
		buf:          make([]byte, 4096), // Plausible starting size; needn't be large.
	}
}

// Err returns the first non-EOF error that was encountered by the Scanner.
func (s *Scanner) Err() error {
	if s.err == io.EOF {
		return nil
	}
	return s.err
}

// Bytes returns the most recent token generated by a call to Scan.
// The underlying array may point to data that will be overwritten
// by a subsequent call to Scan. It does no allocation.
func (s *Scanner) Bytes() []byte {
	return s.token
}

// Text returns the most recent token generated by a call to Scan
// as a newly allocated string holding its bytes.
func (s *Scanner) Text() string {
	return string(s.token)
}

// Scan advances the Scanner to the next token, which will then be
// available through the Bytes or Text method. It returns false when the
// scan stops, either by reaching the end of the input or an error.
// After Scan returns false, the Err method will return any error that
// occurred during scanning, except that if it was io.EOF, Err
// will return nil.
func (s *Scanner) Scan() bool {
	// Loop until we have a token.
	for {
		// See if we can get a token with what we already have.
		if s.end > s.start {
			advance, token, err := s.split(s.buf[s.start:s.end], s.err != nil)
			if err != nil {
				s.setErr(err)
				return false
			}
			if !s.advance(advance) {
				return false
			}
			s.token = token
			if token != nil {
				return true
			}
		}
		// We cannot generate a token with what we are holding.
		// If we've already hit EOF or an I/O error, we are done.
		if s.err != nil {
			// Shut it down.
			s.start = 0
			s.end = 0
			return false
		}
		// Must read more data.
		// First, shift data to beginning of buffer if there's lots of empty space
		// or space is neded.
		if s.start > 0 && (s.end == len(s.buf) || s.start > len(s.buf)/2) {
			copy(s.buf, s.buf[s.start:s.end])
			s.end -= s.start
			s.start = 0
		}
		// Is the buffer full? If so, resize.
		if s.end == len(s.buf) {
			if len(s.buf) >= s.maxTokenSize {
				s.setErr(ErrTooLong)
				return false
			}
			newSize := len(s.buf) * 2
			if newSize > s.maxTokenSize {
				newSize = s.maxTokenSize
			}
			newBuf := make([]byte, newSize)
			copy(newBuf, s.buf[s.start:s.end])
			s.buf = newBuf
			s.end -= s.start
			s.start = 0
			continue
		}
		// Finally we can read some input. Make sure we don't get stuck with
		// a misbehaving Reader. Officially we don't need to do this, but let's
		// be extra careful: Scanner is for safe, simple jobs.
		for loop := 0; ; {
			n, err := s.r.Read(s.buf[s.end:len(s.buf)])
			s.end += n
			if err != nil {
				s.setErr(err)
				break
			}
			if n > 0 {
				break
			}
			loop++
			if loop > 100 {
				s.setErr(io.ErrNoProgress)
				break
			}
		}
	}
}

// advance consumes n bytes of the buffer. It reports whether the advance was legal.
func (s *Scanner) advance(n int) bool {
	if n < 0 {
		s.setErr(ErrNegativeAdvance)
		return false
	}
	if n > s.end-s.start {
		s.setErr(ErrAdvanceTooFar)
		return false
	}
	s.start += n
	return true
}

// setErr records the first error encountered.
func (s *Scanner) setErr(err error) {
	if s.err == nil || s.err == io.EOF {
		s.err = err
	}
}

// Split sets the split function for the Scanner. If called, it must be
// called before Scan. The default split function is ScanLines.
func (s *Scanner) Split(split SplitFunc) {
	s.split = split
}

// Split functions

// ScanBytes is a split function for a Scanner that returns each byte as a token.
func ScanBytes(data []byte, atEOF bool) (advance int, token []byte, err error) {
	if atEOF && len(data) == 0 {
		return 0, nil, nil
	}
	return 1, data[0:1], nil
}

var errorRune = []byte(string(utf8.RuneError))

// ScanRunes is a split function for a Scanner that returns each
// UTF-8-encoded rune as a token. The sequence of runes returned is
// equivalent to that from a range loop over the input as a string, which
// means that erroneous UTF-8 encodings translate to U+FFFD = "\xef\xbf\xbd".
// Because of the Scan interface, this makes it impossible for the client to
// distinguish correctly encoded replacement runes from encoding errors.
func ScanRunes(data []byte, atEOF bool) (advance int, token []byte, err error) {
	if atEOF && len(data) == 0 {
		return 0, nil, nil
	}

	// Fast path 1: ASCII.
	if data[0] < utf8.RuneSelf {
		return 1, data[0:1], nil
	}

	// Fast path 2: Correct UTF-8 decode without error.
	_, width := utf8.DecodeRune(data)
	if width > 1 {
		// It's a valid encoding. Width cannot be one for a correctly encoded
		// non-ASCII rune.
		return width, data[0:width], nil
	}

	// We know it's an error: we have width==1 and implicitly r==utf8.RuneError.
	// Is the error because there wasn't a full rune to be decoded?
	// FullRune distinguishes correctly between erroneous and incomplete encodings.
	if !atEOF && !utf8.FullRune(data) {
		// Incomplete; get more bytes.
		return 0, nil, nil
	}

	// We have a real UTF-8 encoding error. Return a properly encoded error rune
	// but advance only one byte. This matches the behavior of a range loop over
	// an incorrectly encoded string.
	return 1, errorRune, nil
}

// dropCR drops a terminal \r from the data.
func dropCR(data []byte) []byte {
	if len(data) > 0 && data[len(data)-1] == '\r' {
		return data[0 : len(data)-1]
	}
	return data
}

// ScanLines is a split function for a Scanner that returns each line of
// text, stripped of any trailing end-of-line marker. The returned line may
// be empty. The end-of-line marker is one optional carriage return followed
// by one mandatory newline. In regular expression notation, it is `\r?\n`.
// The last non-empty line of input will be returned even if it has no
// newline.
func ScanLines(data []byte, atEOF bool) (advance int, token []byte, err error) {
	if atEOF && len(data) == 0 {
		return 0, nil, nil
	}
	if i := bytes.IndexByte(data, '\n'); i >= 0 {
		// We have a full newline-terminated line.
		return i + 1, dropCR(data[0:i]), nil
	}
	// If we're at EOF, we have a final, non-terminated line. Return it.
	if atEOF {
		return len(data), dropCR(data), nil
	}
	// Request more data.
	return 0, nil, nil
}

// isSpace reports whether the character is a Unicode white space character.
// We avoid dependency on the unicode package, but check validity of the implementation
// in the tests.
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
}

// ScanWords is a split function for a Scanner that returns each
// space-separated word of text, with surrounding spaces deleted. It will
// never return an empty string. The definition of space is set by
// unicode.IsSpace.
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
}

package main

import (
	"fmt"
)

func main() {
	var n int

	fmt.Scan(&n)

	x := n%2*5 + 4

	fmt.Println(x, n-x)
}

package main

import (
	"fmt"
)

func main() {
	var n int

	fmt.Scan(&n)

	if n%2 == 0 {
		fmt.Println(4, n-4)
	} else {
		fmt.Println(9, n-9)
	}
}

package main

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

func main() {
	var n int

	scr := bufio.NewReader(os.Stdin)
	ocr := bufio.NewWriter(os.Stdout)

	fmt.Fscanln(scr, &n)

	if n % 2 == 0 {
		fmt.Fprintln(ocr, 4, (n - 4))
		ocr.Flush()

	}else{
		fmt.Fprintln(ocr, 9, (n - 9))
		ocr.Flush()
	}

}

package main

import (
	"fmt"
	"math"
)

func prime(n int) bool {
	if n <= 2 {
		return true
	}

	m := int(math.Sqrt(float64(n)))
	for i := 2; i <= m; i++ {
		if n%i == 0 {
			return false
		}
	}

	return true
}

func main() {
	var n, x, y int
	fmt.Scan(&n)
	if n%2 == 0 {
		x = n / 2
		y = x
	} else {
		x = n / 2
		y = x + 1
	}

	for {
		if !prime(x) && !prime(y) {
			fmt.Printf("%d %d", x, y)
			return
		}
		x -= 1
		y += 1
	}

}

package main

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

var reader *bufio.Reader

func init() {
	stdin := os.Stdin
	// stdin, _ = os.Open("1.in")
	reader = bufio.NewReaderSize(stdin, 1<<20)
}

var n int

// IsPrime 素性测试
func IsPrime(n int) bool {
	for i := 2; i*i <= n; i++ {
		if n%i == 0 {
			return false
		}
	}
	return n != 1
}

func main() {
	fmt.Fscan(reader, &n)
	for i := 4; i <= n; i++ {
		if !IsPrime(i) && !IsPrime(n-i) {
			fmt.Println(i, n-i)
			return
		}
	}
}

package main

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

func main() {
	var n uint32
	var a uint32 = 4
	var b uint32 = 4
	in := bufio.NewReader(os.Stdin)
	fmt.Fscanf(in, "%d\n", &n)

	b = n - b

	for i:=b; i > 3; i--{
		if check(a) && check(b){
			break
			}else{
				a++
				b--
			}
	}
	fmt.Println(a,b)
}
func check(a uint32) bool{
	for i:=uint32(2); i < a; i++{
		if a % i == 0{
			return true;
		}
	}
	return false
}

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

	n := readi()
	if n%2 == 0 {
		println(4, n-4)
	} else {
		println(9, n-9)
	}
}

package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	if n%2 == 0 {
		fmt.Print(4, " ", n-4)
		return
	}
	if n-9 < 9 {
		fmt.Print(n-9, " ", 9)
	} else {
		fmt.Print(9, " ", n-9)
	}
}

package main

import "fmt"

func IsPrime(n int) bool {
  for i := 2; i * i <= n; i++ {
    if n % i == 0 {
      return false
    }
  }
  return n >= 2
}

func main() {
  var n int
  fmt.Scanf("%d",&n)
  for x := 2; x + x <= n; x+=1 {
    if !IsPrime(x) && !IsPrime(n - x) {
      fmt.Println(x, n-x)
      break
    }
  }
}

package main

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

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

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

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

    n := ReadInt32()
    if n%2 == 0 {
        fmt.Printf("%d %d\n", 4, n-4)
    } else {
        fmt.Printf("%d %d\n", 9, n-9)
    }
}

package main

import (
    "fmt"
    "math"
    )

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

    is_prime := make([]bool, n+1)
    for i := 0; i <= n; i++ {
        is_prime[i] = true;
    }
    for i := 2; i <= int(math.Sqrt(float64(n))); i++ {
        for j := 2; i*j <= n; j++ {
            if is_prime[i] {
                is_prime[i*j] = false
            }
        }
    }

    x := n/2
    for x >= 4 {
        if !is_prime[x] && !is_prime[n-x] {
            break
        }
        x--
    }

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

//  URL: http://codeforces.com/problemset/problem/472/A
//  PROBLEM RESTATEMENT
//      Prove that each integer n >= 12 can be expressed as the sum of two
//      composite numbers.
//  APPROACH
//      1) 12 = 8 + 4. All even n >= 12 can be created by adding 2 to either
//         composite number.
//      2) 13 = 9 + 4. All odd n >= 13 can be created by adding 2 to the even
//         composite number.

package main

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

func solve(n int) (int, int) {
	if n%2 == 0 {
		return 8, n - 8
	} else {
		return 9, n - 9
	}
}

func main() {
	reader, writer := bufio.NewReader(os.Stdin), bufio.NewWriter(os.Stdout)
	defer writer.Flush()
	var n int
	fmt.Fscanf(reader, "%d\n", &n)
	x, y := solve(n)
	fmt.Fprintf(writer, "%d %d\n", x, y)
}

package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	var primes = make([]bool, n)

	for i := 2; i * i < n; i++ {
		for j := 2; i * j < n; j++ {
			primes[i * j] = true
		}
	}

	for i := 4; i < len(primes); i++ {
		if primes[i] {
			for j := 4; j < len(primes); j++ {
				if primes[j] {
					if i + j == n {
						fmt.Println(i, j)
						return
					}
				}
			}
		}
	}
}

package main

import (
	"fmt"
	"math"
)

func IsPrimeSqrt(value int) bool {
	for i := 2; i <= int(math.Floor(math.Sqrt(float64(value)))); i++ {
		if value%i == 0 {
			return false
		}
	}
	return value > 1
}

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

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	n := 0
	fmt.Fscan(in, &n)
	x, y := 4, 0
	if n&1 == 1 {
		// 1st odd non prime > 4
		x = 9
	}
	y = n - x
	fmt.Fprintln(out, x, y)
}

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	n, x, y := 0, 4, 0
	fmt.Fscan(in, &n)
	if n&1 == 1 {
		// 1st odd non prime > 4
		x = 9
	}
	y = n - x
	fmt.Fprintln(out, x, y)
}

package main

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

const INF  = 1000000001

type Pair struct {
	first, second int
}

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

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

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

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

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

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

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

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

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

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

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

func solution(reader io.Reader, writer io.Writer) {
	var n int
	fmt.Fscanf(reader, "%d\n", &n)
	if n % 2 == 0 {
		fmt.Println(4, n - 4)
	} else {
		fmt.Println(9, n - 9)
	}
}

func main() {

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

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

	solution(reader, writer)
}

package main

import "fmt"

// https://codeforces.com/problemset/problem/472/A
// A. Design Tutorial: Learn from Math
// time limit per test
// 1 second
// memory limit per test
// 256 megabytes
// input
// standard input
// output
// standard output

// One way to create a task is to learn from math. You can generate some random math statement or modify some theorems to get something new and build a new task from that.

// For example, there is a statement called the "Goldbach's conjecture". It says: "each even number no less than four can be expressed as the sum of two primes". Let's modify it. How about a statement like that: "each integer no less than 12 can be expressed as the sum of two composite numbers." Not like the Goldbach's conjecture, I can prove this theorem.

// You are given an integer n no less than 12, express it as a sum of two composite numbers.
// Input

// The only line contains an integer n (12 ≤ n ≤ 106).
// Output

// Output two composite integers x and y (1 < x, y < n) such that x + y = n. If there are multiple solutions, you can output any of them.

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

	// there is a neat trick here that allows us to determine the composite pair
	// if n is odd, 9 and n-9 are a composite pair
	// n-9 is one of the numbers in the sequence 4, 6, 8, 10, 12, etc... so it is composite
	//
	// if n is even, 8 and n-8 are a composite pair
	// n-8 is one of the numbers in the sequence 4, 6, 8, 10, 12, etc... so it is composite

	if n%2 == 0 {
		fmt.Print(8, n-8)
	} else {
		fmt.Print(9, n-9)
	}
}

package main

import (
	"fmt"
)

func main() {
	var n int64
	fmt.Scanf("%d\n", &n)
	if n&1 == 0 {
		x := n - 8
		fmt.Println(x, 8)
	}else{
		x := n - 9
		fmt.Println(x,9)
	}

}

package main

import(
    "fmt"
)

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

package main

import (
	"fmt"
	//"math"
)

func main() {
	const size = 1000001
	compl_nums := make([]bool, size)
	for i := 2; i < size/2+1; i++ {
		if compl_nums[i] == false {
			for j := 2 * i; j < size; j += i {
				compl_nums[j] = true
			}
		}
	}

	var n int
	fmt.Scan(&n)

	for i := 2; i < n/2; i++ {
		if compl_nums[i] && compl_nums[n-i] {
			fmt.Print(i, n-i)
			break
		}
	}
}

package main

import (
	"fmt"
	//"math"
)

func main() {
	const size = 1000001
	compl_nums := make([]bool, size)
	for i := 2; i < size/2+1; i++ {
		if compl_nums[i] == false {
			for j := 2 * i; j < size; j += i {
				compl_nums[j] = true
			}
		}
	}

	var n int
	fmt.Scan(&n)

	for i := 2; i < n/2; i++ {
		if compl_nums[i] && compl_nums[n-i] {
			fmt.Println(i, n-i)
			break
		}
	}
}

	package main

   import ("fmt"
		   "math/big")

   func main(){

	   var input int64
	   fmt.Scan(&input)
	   if true {

		   var res int64
		   res=input-4
		  if (big.NewInt(res).ProbablyPrime(0)){
			  fmt.Printf("%d %d\n",res, 4)

		  }

		  }
		  if true{

		var res int64
		  res=input-6
	     if	(big.NewInt(res).ProbablyPrime(0)){
			fmt.Printf("%d %d\n",res, 6)
			}
	   }
	    if true{

		var res int64
		res=input-8
		if	(big.NewInt(res).ProbablyPrime(0)){
			fmt.Printf("%d %d\n",res, 8)

	   }
	}
	if true{

		res:=input/2
		if	!(big.NewInt(res).ProbablyPrime(0)){
			fmt.Print(res , res)

	}
   }
   return
}

	package main

   import ("fmt"
		   "math/big")

   func main(){

	   var input int64
	   fmt.Scan(&input)
	   if true {
		   var res int64
		   res=input-4
		  if !(big.NewInt(res).ProbablyPrime(0)){
			  fmt.Print(res, 4)
			  return
		  }
	   }else if true{
		var res int64
		  res=input-6
	     if	!(big.NewInt(res).ProbablyPrime(0)){
			fmt.Print(res , 6)
			return}
	   }else if true{
		var res int64
		res=input-8
		if	!(big.NewInt(res).ProbablyPrime(0)){
		   fmt.Print(res,8)
		   return
	   }
	}else if true{
		res:=input/2
		if	!(big.NewInt(res).ProbablyPrime(0)){
			fmt.Print(res , res)
			return
	}
   }
}

	package main

   import ("fmt"
		   "math/big")

   func main(){
	   fmt.Print("hello")
	   var input int64
	   fmt.Scan(&input)
	   if true {
		   var res int64
		   res=input-4
		  if !(big.NewInt(res).ProbablyPrime(0)){
			  fmt.Print(res, 4)
			  return
		  }
	   }else if true{
		var res int64
		  res=input-6
	     if	!(big.NewInt(res).ProbablyPrime(0)){
			fmt.Print(res , 6)
			return}
	   }else if true{
		var res int64
		res=input-8
		if	!(big.NewInt(res).ProbablyPrime(0)){
		   fmt.Print(res,8)
		   return
	   }
	}else if true{
		res:=input/2
		if	!(big.NewInt(res).ProbablyPrime(0)){
			fmt.Print(res , res)
			return
	}
   }
}

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	n, x, y := 0, 5, 0
	fmt.Fscan(in, &n)
	if n&1 == 0 {
		x = 4
	}
	y = n - x
	fmt.Fprintln(out, x, y)
}

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	n, x, y := 0, 0, 0
	fmt.Fscan(in, &n)
	if n&1 == 0 {
		x = n / 2
		y = x
	} else {
		x = n / 2
		y = x + 1
	}
	fmt.Fprintln(out, x, y)
}

package main

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

const INF  = 1000000001

type Pair struct {
	first, second int
}

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

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

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

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

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

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

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

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

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

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

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

func solution(reader io.Reader, writer io.Writer) {
	var n int
	fmt.Fscanf(reader, "%d\n", &n)
	fmt.Println(5, n - 5)
}

func main() {

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

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

	solution(reader, writer)
}

package main

import (
	"fmt"
)

func main() {
	var n int64
	fmt.Scanf("%d\n", &n)
	if n&1 == 0 {
		fmt.Println(n >> 1, n >> 1)
	}else{
		x := n - 9
		fmt.Println(x,9)
	}

}


package main

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

/*
7
1 1 1
2 1 3
5 5 5
1 1 2
1 2 3
3 2 1
1 3 2
---
0
1
0
1
0
0
1
*/

//goland:noinspection GoUnhandledErrorResult
func main() {
	defer writer.Flush()

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

	bld := strings.Builder{}

	for k := 0; k < t; k++ {
		var a, b, c int
		scanf("%d %d %d\n", &a, &b, &c)

		fst := c / 2 * 3
		snd := c / 2 * 3

		fst += c % 2 * 3

		if fst > snd {
			snd += 2
		} else {
			fst += 2
		}
		b--

		fst += b / 2 * 2
		snd += b / 2 * 2

		if fst > snd {
			snd += b % 2 * 2
		} else {
			fst += b % 2 * 2
		}

		diff := abs(fst - snd)
		if a >= diff {
			fst = 0
			snd = 0
			a -= diff

			fst += a / 2
			snd += a / 2

			fst += a % 2
		} else {
			if fst > snd {
				snd += a
			} else {
				fst += a
			}
			a = 0
		}

		fmt.Fprintf(&bld, "%d\n", abs(fst - snd))
	}

	printf("%s", bld.String())
}

const maxUint = ^uint(0)

//goland:noinspection GoUnusedConst
const minUint = 0
const maxInt = int(maxUint >> 1)

//goland:noinspection GoUnusedConst
const minInt = -maxInt - 1

//goland:noinspection GoUnusedType
type pair struct {
	fst, snd int
}

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

//goland:noinspection GoUnusedFunction
func printf(f string, a ...interface{}) {
	if _, err := fmt.Fprintf(writer, f, a...); err != nil {
		panic(err)
	}
}

func scanf(f string, a ...interface{}) {
	if _, err := fmt.Fscanf(reader, f, a...); err != nil {
		panic(err)
	}
}

//goland:noinspection GoUnusedFunction
func min(x, y int) int {
	if x < y {
		return x
	}
	return y
}

//goland:noinspection GoUnusedFunction
func max(x, y int) int {
	if x > y {
		return x
	}
	return y
}

//goland:noinspection GoUnusedFunction
func abs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}

//goland:noinspection GoUnusedFunction
func isPrime(n int) bool {
	if n == 2 || n == 3 {
		return true
	}

	if n <= 1 || n%2 == 0 || n%3 == 0 {
		return false
	}

	for i := 5; i*i <= n; i += 6 {
		if n%i == 0 || n%(i+2) == 0 {
			return false
		}
	}

	return true
}

package main

import "fmt"

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

    for i:=0; i<a; i++ {
        var s,d,k int64
        fmt.Scan(&s, &d, &k)
        if (s+k) % 2 == 0 {
            fmt.Println(0)
        } else {
            fmt.Println(1)
        }
    }
}

package main

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

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

func CF1582A(in io.Reader, out io.Writer) {
	r := bufio.NewReader(in)
	w := bufio.NewWriter(out)
	defer w.Flush()

	var T int
	for fmt.Fscan(r, &T); T > 0; T-- {
		var a, b, c int64
		fmt.Fscan(r, &a, &b, &c)
		ans := 0
		if c%2 == 1 {
			ans += 3
		}
		if b%2 == 1 {
			ans += 2
		}
		if a%2 == 1 {
			ans += 1
		}

		fmt.Fprintln(w, ans%2)
	}
}

package main

import (
	"fmt"
)

func main() {
	var testCase int
	var x, y, z int64

	fmt.Scanf("%d\n", &testCase)
	for i := 0; i < testCase; i++ {
		fmt.Scanf("%d %d %d \n", &x, &y, &z)
		n := x + y*2 + z*3
		fmt.Println(n % 2)
	}
}

package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	for i := 0; i < n; i++ {
		var a, b, c int64
		fmt.Scan(&a, &b, &c)
		fmt.Println((a + b*2 + c*3) % 2)
	}
}

package main

import "fmt"

func main() {
	var t,a,b,c int

	fmt.Scan(&t)

	for ; t > 0 ; t--  {

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

		fmt.Println((a + c) % 2)

	}

}

package main

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

type CF1582A struct {
	sc        *bufio.Reader
	split     []string
	index     int
	separator string
}

func (in *CF1582A) GetLine() string {
	line, err := in.sc.ReadString('\n')
	if err != nil {
		fmt.Println("error line:", line, " err: ", err)
	}
	in.split = []string{}
	in.index = 0
	return line
}
func (in *CF1582A) load() {
	if len(in.split) <= in.index {
		in.split = strings.Split(in.GetLine(), in.separator)
		in.index = 0
	}
}

func (in *CF1582A) NextInt() int {
	in.load()
	val, _ := strconv.Atoi(strings.TrimSpace(in.split[in.index]))
	in.index++
	return val
}

func (in *CF1582A) NextInt64() int64 {
	in.load()
	val, _ := strconv.ParseInt(strings.TrimSpace(in.split[in.index]), 10, 64)
	in.index++
	return val
}

func (in *CF1582A) NextString() string {
	in.load()
	val := strings.TrimSpace(in.split[in.index])
	in.index++
	return val
}

/**
Run solve the problem CF1582A
Date: 24/03/22
User: pepradere
URL: https://codeforces.com/problemset/problem/1582/A
Problem: CF1582A
**/
func (in *CF1582A) Run() {
	for t := in.NextInt(); t > 0; t-- {
		a, _, c := in.NextInt(), in.NextInt(), in.NextInt()
		fmt.Println((a + c) % 2)
	}
}

func NewCF1582A(r *bufio.Reader) *CF1582A {
	return &CF1582A{
		sc:        r,
		split:     []string{},
		index:     0,
		separator: " ",
	}
}

func main() {
	NewCF1582A(bufio.NewReader(os.Stdin)).Run()
}

package main

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

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

	var T int
	fmt.Fscan(in, &T)

	for t := 0; t < T; t++ {
		var a, b, c int
		fmt.Fscan(in, &a, &b, &c)

		fmt.Fprintln(out, (a+c)%2)
	}
}

package main

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

var (
	reader  = bufio.NewReader(os.Stdin)
	t       int
	a, b, c int64
)

func solve(a, b, c int64) int64 {
	return (a + 2*b + 3*c) % 2
}

func main() {
	fmt.Fscan(reader, &t)
	for ; t > 0; t-- {
		fmt.Fscan(reader, &a, &b, &c)
		fmt.Println(solve(a, b, c))
	}
}

package main

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

// var m []int
// err = json.Unmarshal([]byte(r.FormValue("example")), &m)

// for i := 0; i < len(m); i++ {
// 	fmt.Println(m[i])
// }

// sort.Slice(arr, func(i, j int) bool {
// 	return arr[i] > arr[j]
// })

func MIN(x, y int64) int64 {
	if x > y {
		return y
	} else {
		return x
	}
}

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

func MKO(x, y int64) int64 {
	if x < y {
		return 0
	} else {
		return x - y + 1
	}
}

func MAX(x, y int64) int64 {
	if x > y {
		return x
	} else {
		return y
	}
}

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

func LCM(x, y int) int {
	if x >= y {
		initial := x
		for i := 1; i < y+2; i++ {
			if initial%y == 0 {
				break
			} else {
				initial = initial + x
			}

		}
		return initial
	} else {
		initial := y
		for i := 1; i < x+2; i++ {
			if initial%x == 0 {
				break
			} else {
				initial = initial + y
			}

		}
		return initial
	}
}

func GCD(x, y int64) int64 {
	if x*y == 0 {
		return MAX(x, y)
	} else {
		var l, q int64
		l = MAX(x, y)
		q = MIN(x, y)
		var m int64
		for l*q > 0 {
			a := l % q
			b := l - a
			cc := int64(b / q)
			remain := l - cc*q
			l = MAX(remain, q)
			q = MIN(remain, q)
			if l*q == 0 {
				m = l + q
				break
			}

		}
		return m
	}
}

func IsItPrime(x int) bool {
	if x < 10 {
		if x == 2 || x == 3 || x == 5 || x == 7 {
			return true
		} else {
			return false
		}
	} else {
		j := 0
		k := math.Sqrt(float64(x))
		for m := 3; m <= int(k); {
			if x%m == 0 {
				j = 1
				break
			}
			m = m + 2
		}
		if j == 1 {
			return false
		} else {
			return true
		}
	}
}

func PrimeFactorization(n int) (pfs map[int]int) {
	pfs = make(map[int]int)

	// Get the number of 2s that divide n
	for n%2 == 0 {
		if _, ok := pfs[2]; ok {
			pfs[2] += 1
		} else {
			pfs[2] = 1
		}
		n = n / 2
	}

	// n must be odd at this point. so we can skip one element
	// (note i = i + 2)
	for i := 3; i*i <= n; i = i + 2 {
		// while i divides n, append i and divide n
		for n%i == 0 {
			if _, ok := pfs[i]; ok {
				pfs[i] += 1
			} else {
				pfs[i] = 1
			}
			n = n / i
		}
	}

	// This condition is to handle the case when n is a prime number
	// greater than 2
	if n > 2 {
		pfs[n] = 1
	}

	return
}

func NumberOfDivisors(n int) int {
	pfs := PrimeFactorization(n)

	num := 1
	for _, exponents := range pfs {
		num *= (exponents + 1)
	}

	return num
}

func KthPrime(x int) (y int) {
	if x == 1 {
		y = 2
	}
	if x == 2 {
		y = 3
	}
	if x > 2 {
		var sum int = 2
		begin := 5
		for sum < x+1 {
			if IsItPrime(begin) == true {
				sum++
			}
			if sum == x {
				y = begin
				break
			} else {
				if begin%6 == 1 {
					begin = begin + 4
				} else {
					begin = begin + 2
				}
			}
		}
	}
	return
}

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

func BITAND(x, y int64) int64 {
	var ans int64
	begin := x
	sec := y
	var count int64 = 1
	for 1 == 1 {
		if (begin%2)*(sec%2) == 1 {
			ans = ans + count
			count = count * 2
			begin = int64(begin / 2)
			sec = int64(sec / 2)
			if begin*sec == 0 {
				break
			}

		} else {
			count = count * 2
			begin = int64(begin / 2)
			sec = int64(sec / 2)
			if begin*sec == 0 {
				break
			}
		}
	}
	return ans
}

func Sum(n, m int) int {
	var ans int

	if n == 1 {
		return 0
	} else {
		for i := 2; i < n; i++ {
			ans = (ans + Sum(i, m)) % m
		}
		for j := 2; j < n+1; j++ {
			ans = (ans + Sum(n/j, m)) % m
		}
		return ans
	}
}

func ChangeStringToDate(x string) (t time.Time, err error) {
	t, err = time.Parse("2006-01-02", x)
	return
}

func DiffrenceBetweenTwoDates(first, second time.Time) int64 {
	date := first
	date2 := second
	k := date.Unix() - date2.Unix()
	return k
}

func Union(a, b []int) []int {
	m := make(map[int]bool)

	for _, item := range a {
		m[item] = true
	}

	for _, item := range b {
		if _, ok := m[item]; !ok {
			a = append(a, item)
		}
	}
	return a
}

// for o := 0; o < t; o++ {
// 	var a, b, c int
// 	fmt.Fscan(input, &a, &b, &c)

// 	A := a % 2
// 	B := b % 2
// 	C := c % 2
// 	if A+B+C == 0 {
// 		fmt.Println(0)
// 	}
// 	if A+B+C == 1 {
// 		if A == 1 {
// 			fmt.Println(1)
// 		}
// 		if B == 1 {
// 			if a >= 2 {
// 				fmt.Println(0)
// 			} else {
// 				fmt.Println(2)
// 			}
// 		}
// 		if C == 1 {
// 			if a > 0
// 			fmt.Println(1)
// 		}
// 	}
// 	if A+B+C == 2 {

// 	}
// 	if A+B+C == 3 {
// 		fmt.Println(0)
// 	}

// }

func ABS(x int) int {
	if x < 0 {
		return -x
	} else {
		return x
	}
}

var t int

func main() {
	var input io.Reader = bufio.NewReader(os.Stdin)
	fmt.Fscan(input, &t)

	for o := 0; o < t; o++ {
		var a, b, c int
		fmt.Fscan(input, &a, &b, &c)

		A := a % 2
		B := b % 2
		C := c % 2
		if A == 1 {
			if B+C == 2 {
				fmt.Println(0)
			}
			if B+C == 1 {
				if C == 1 {
					if b > 0 || c > 1 {
						fmt.Println(0)
					} else {
						fmt.Println(2)
					}
				} else {
					fmt.Println(1)
				}
			}
			if B+C == 0 {
				fmt.Println(1)
			}
		} else {
			if B+C == 2 {
				fmt.Println(1)
			}
			if B+C == 1 {
				if C == 1 {
					if a+b == 0 {
						fmt.Println(3)
					} else {
						fmt.Println(1)

					}
				} else {
					if a > 0 {
						fmt.Println(0)
					} else {
						if c == 0 {
							fmt.Println(2)
						} else {
							if b > 1 {
								fmt.Println(0)
							} else {
								fmt.Println(2)

							}
						}
					}
				}

			}
			if B+C == 0 {
				fmt.Println(0)
			}
		}
	}

}

package main

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

func main() {
	reader := bReader(os.Stdin)
	writer := bWriter(os.Stdout)

	t := readInt(reader)

	for t > 0 {
		a, b, c := readThreeInt64(reader)
		fmt.Fprintln(writer, (a + 2*b + 3*c)%2)

		t--
	}

	writer.Flush()
}

func bReader(stdin *os.File) *bufio.Reader {
	return bufio.NewReaderSize(stdin, 16*1024*1024)
}

func bWriter(stdout *os.File) *bufio.Writer {
	return bufio.NewWriterSize(stdout, 16*1024*1024)
}

func readLine(reader *bufio.Reader) string {
	str, _, err := reader.ReadLine()
	if err == io.EOF {
		return ""
	}

	return strings.TrimRight(string(str), "\r\n")
}

func checkError(err error) {
	if err != nil {
		panic(err)
	}
}

func readInt(reader *bufio.Reader) int {
	return int(readInt64(reader))
}

func readInt64(reader *bufio.Reader) int64 {
	value, err := strconv.ParseInt(readLine(reader), 10, 64)
	checkError(err)

	return value
}

func readString(reader *bufio.Reader) string {
	return readLine(reader)
}

func readArrayString(reader *bufio.Reader) []string {
	return strings.Split(strings.TrimSpace(readLine(reader)), " ")
}

func readArrayInt(reader *bufio.Reader) []int {
	arTemp := strings.Split(strings.TrimSpace(readLine(reader)), " ")
	n := len(arTemp)

	var ar []int

	for i := 0; i < n; i++ {
		arItemTemp, err := strconv.ParseInt(arTemp[i], 10, 64)
		checkError(err)
		arItem := int(arItemTemp)
		ar = append(ar, arItem)
	}

	return ar
}

func readArrayInt64(reader *bufio.Reader) []int64 {
	arTemp := strings.Split(strings.TrimSpace(readLine(reader)), " ")
	n := len(arTemp)

	var ar []int64

	for i := 0; i < n; i++ {
		arItemTemp, err := strconv.ParseInt(arTemp[i], 10, 64)
		checkError(err)
		arItem := arItemTemp
		ar = append(ar, arItem)
	}

	return ar
}

func readTwoInt(reader *bufio.Reader) (int, int) {
	ar := readArrayInt(reader)
	return ar[0], ar[1]
}

func readTwoInt64(reader *bufio.Reader) (int64, int64) {
	ar := readArrayInt64(reader)
	return ar[0], ar[1]
}

func readThreeInt(reader *bufio.Reader) (int, int, int) {
	ar := readArrayInt(reader)
	return ar[0], ar[1], ar[2]
}

func readThreeInt64(reader *bufio.Reader) (int64, int64, int64) {
	ar := readArrayInt64(reader)
	return ar[0], ar[1], ar[2]
}

package main

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

//Luntik has decided to try singing. He has 𝑎 one-minute songs, 𝑏 two-minute songs and 𝑐 three-minute songs. He wants to distribute all songs into two concerts such that every song should be included to exactly one concert.
//
//He wants to make the absolute difference of durations of the concerts as small as possible. The duration of the concert is the sum of durations of all songs in that concert.
//
//Please help Luntik and find the minimal possible difference in minutes between the concerts durations.

//
var sc, wr = bufio.NewScanner(os.Stdin), bufio.NewWriter(os.Stdout)

func scanString() string { sc.Scan(); return sc.Text() }
func scanRunes() []rune  { return []rune(scanString()) }
func scanInt() int       { a, _ := strconv.Atoi(scanString()); return a }
func scanInt64() int64   { a, _ := strconv.ParseInt(scanString(), 10, 64); return a }
func scanFloat() float64 { a, _ := strconv.ParseFloat(scanString(), 64); return a }

func scanInt64s(n int) []int64 {
	a := make([]int64, n)
	for i := 0; i < n; i++ {
		a[i] = scanInt64()
	}
	return a
}

func main() {
	sc.Split(bufio.ScanWords)
	n := scanInt()
	for i := 0; i < n; i++ {
		a := scanInt64s(3)
		fmt.Println((a[0] + 2*a[1] + 3*a[2]) % 2)
	}
}

package main

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

//Luntik has decided to try singing. He has 𝑎 one-minute songs, 𝑏 two-minute songs and 𝑐 three-minute songs. He wants to distribute all songs into two concerts such that every song should be included to exactly one concert.
//
//He wants to make the absolute difference of durations of the concerts as small as possible. The duration of the concert is the sum of durations of all songs in that concert.
//
//Please help Luntik and find the minimal possible difference in minutes between the concerts durations.

//
var sc, wr = bufio.NewScanner(os.Stdin), bufio.NewWriter(os.Stdout)

func scanString() string { sc.Scan(); return sc.Text() }
func scanRunes() []rune  { return []rune(scanString()) }
func scanInt() int       { a, _ := strconv.Atoi(scanString()); return a }
func scanInt64() int64   { a, _ := strconv.ParseInt(scanString(), 10, 64); return a }
func scanFloat() float64 { a, _ := strconv.ParseFloat(scanString(), 64); return a }

func scanInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = scanInt()
	}
	return a
}

func main() {
	sc.Split(bufio.ScanWords)
	n := scanInt()
	for i := 0; i < n; i++ {
		a := scanInts(3)
		fmt.Println((a[0] + 2*a[1] + 3*a[2]) % 2)
	}
}

package main

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

//Luntik has decided to try singing. He has 𝑎 one-minute songs, 𝑏 two-minute songs and 𝑐 three-minute songs. He wants to distribute all songs into two concerts such that every song should be included to exactly one concert.
//
//He wants to make the absolute difference of durations of the concerts as small as possible. The duration of the concert is the sum of durations of all songs in that concert.
//
//Please help Luntik and find the minimal possible difference in minutes between the concerts durations.

//The first line contains a single integer 𝑡 (1≤𝑡≤1000) — the number of test cases.
//
//Each test case consists of one line containing three integers 𝑎,𝑏,𝑐 (1≤𝑎,𝑏,𝑐≤109) — the number of one-minute, two-minute and three-minute songs.
var sc, wr = bufio.NewScanner(os.Stdin), bufio.NewWriter(os.Stdout)

func scanString() string { sc.Scan(); return sc.Text() }
func scanRunes() []rune  { return []rune(scanString()) }
func scanInt() int       { a, _ := strconv.Atoi(scanString()); return a }
func scanInt64() int64   { a, _ := strconv.ParseInt(scanString(), 10, 64); return a }
func scanFloat() float64 { a, _ := strconv.ParseFloat(scanString(), 64); return a }

func scanInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = scanInt()
	}
	return a
}

func main() {
	sc.Split(bufio.ScanWords)
	a := scanInts(scanInt())
	fmt.Println((a[0] + 2*a[1] + 3*a[2]) % 2)
}

package main

import "fmt"

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

    for i:=0; i<a; i++ {
        var s,d,k int64
        fmt.Scan(&s, &d, &k)
        if (s+d+k) % 2 == 0 {
            fmt.Println(1)
        } else {
            fmt.Println(0)
        }
    }
}

package main

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

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

func CF1582A(in io.Reader, out io.Writer) {
	r := bufio.NewReader(in)
	w := bufio.NewWriter(out)
	defer w.Flush()

	var T int
	for fmt.Fscan(r, &T); T > 0; T-- {
		var a, b, c int64
		fmt.Fscan(r, &a, &b, &c)
		ans := 0
		if c%2 == 1 {
			if c > 0 {
				ans = 3
			}
		}
		if b%2 == 1 {
			if b > 0 {
				if ans > 0 {
					ans -= 2
				} else {
					ans = 2
				}
			}
		}
		if a%2 == 1 {
			if a > 0 {
				if ans > 0 {
					ans -= 1
				} else {
					ans = 1
				}
			}
		}
		fmt.Fprintln(w, ans)
	}
}

package main

import (
	"fmt"
)

func main() {
	var testCase int
	var x, y, z int

	fmt.Scanf("%d\n", &testCase)
	for i := 0; i < testCase; i++ {
		fmt.Scanf("%d %d %d \n", &x, &y, &z)
		n := x + y*2 + z*3
		fmt.Println(n % 2)
	}
}

package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	for i := 0; i < n; i++ {
		var a, b, c int
		fmt.Scan(&a, &b, &c)
		fmt.Println((a + b*2 + c*3) % 2)
	}
}