package main

import (
	"fmt"
)

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

	if l != r {
		fmt.Println(2)
	} else {
		fmt.Println(l)
	}
}

package main

import "fmt"

func main() {
	var l, r, ret int
	fmt.Scanf("%d %d", &l, &r)

	if l == r {
		ret = l
	} else {
		ret = 2
	}

	fmt.Println(ret)
}

package main

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

func solve() {
	l := readInt()
	r := readInt()
	if l == r {
		fmt.Println(l)
		return
	}
	fmt.Println(2)
}

var scanner *bufio.Scanner

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

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

// IO

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

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

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

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

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

package main

import "fmt"

func main() {
    var l, r int
    fmt.Scan(&l, &r)
    if r - l == 3 && l % 3 == 0 {
        fmt.Print(3)
    } else if r == l && l % 2 == 1 {
        fmt.Print(l)
    } else {
        fmt.Print(2)
    }
}

package main

import (
	"fmt"
)

func main() {
	var l, r, count2, count3, count5, max, answer int
	fmt.Scanf("%d %d", &l, &r)
	for i := l; i <= r; i++ {
		if i%2 == 0 {
			count2++
		} else if i%3 == 0 {
			count3++
		} else if i%5 == 0 {
			count5++
		} else {
			answer = l
		}
		if i > l+100 {
			break
		}
	}
	if count2 > max {
		max = count2
		answer = 2
	}
	if count3 > max {
		max = count3
		answer = 3
	}
	if count5 > max {
		answer = 5
	}
	fmt.Println(answer)
}

package main

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

func Solve(io *FastIO) {
	L := io.NextInt()
	R := io.NextInt()

	if R > L {
		io.Println(2)
	} else {
		io.Println(L)
	}
}

type FastIO struct {
	reader *bufio.Reader
	writer *bufio.Writer
}

func (io *FastIO) NextChar() byte {
	c, _ := io.reader.ReadByte()
	return c
}

func (io *FastIO) NextInt() int {
	c := io.NextChar()
	for IsSpaceChar(c) {
		c = io.NextChar()
	}
	sgn := 1
	if c == '-' {
		sgn = -1
		c = io.NextChar()
	}
	res := 0
	for !IsSpaceChar(c) {
		res = (res * 10) + int(c - '0')
		c = io.NextChar()
	}
	return sgn * res
}

func (io *FastIO) NextLong() int64 {
	c := io.NextChar()
	for IsSpaceChar(c) {
		c = io.NextChar()
	}
	sgn := int64(1)
	if c == '-' {
		sgn = -1
		c = io.NextChar()
	}
	res := int64(0)
	for !IsSpaceChar(c) {
		res = (res * 10) + int64(c - '0')
		c = io.NextChar()
	}
	return sgn * res
}

func (io *FastIO) NextIntArray(size int) []int {
	return io.NextIntArrayOffset(size, 0)
}

func (io *FastIO) NextIntArrayOffset(size, offset int) []int {
	arr := make([]int, size + offset)
	for i := 0; i < size; i++ {
		arr[i + offset] = io.NextInt()
	}
	return arr
}

func (io *FastIO) NextLongArray(size int) []int64 {
	return io.NextLongArrayOffset(size, 0)
}

func (io *FastIO) NextLongArrayOffset(size, offset int) []int64 {
	arr := make([]int64, size + offset)
	for i := 0; i < size; i++ {
		arr[i + offset] = io.NextLong()
	}
	return arr
}

func (io *FastIO) NextString() string {
	c := io.NextChar()
	for (IsSpaceChar(c)) {
		c = io.NextChar()
	}
	var sb bytes.Buffer
	for !IsSpaceChar(c) {
		sb.WriteByte(c)
		c = io.NextChar()
	}
	return sb.String()
}

func (io *FastIO) NextLine() string {
	c := io.NextChar()
	for (IsSpaceChar(c)) {
		c = io.NextChar()
	}
	var sb bytes.Buffer
	for !IsLineBreakChar(c) {
		sb.WriteByte(c)
		c = io.NextChar()
	}
	return sb.String()
}

func (io *FastIO) Println(args ...interface{}) {
	io.writer.WriteString(fmt.Sprintln(args...))
}

func (io *FastIO) Printf(format string, args ...interface{}) {
	io.writer.WriteString(fmt.Sprintf(format, args...))
}

func (io *FastIO) FlushOutput() {
	io.writer.Flush()
}

func IsSpaceChar(c byte) bool {
	switch c {
	case 0, '\t', '\n', '\r', ' ':
		return true
	default:
		return false
	}
}

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

func main() {
	io := FastIO{reader: bufio.NewReader(os.Stdin), writer: bufio.NewWriter(os.Stdout)}
	Solve(&io)
	io.FlushOutput()
}

package main

import "fmt"

func main() {
    var l, r int
    fmt.Scanf("%d%d", &l, &r)
    if l == r {
        fmt.Printf("%d", l)
    } else {
        fmt.Printf("2")
    }
}

// cf805a project main.go
package main

import (
	"fmt"
)

func main() {
	var l, r int
	fmt.Scanln(&l, &r)
	if r-l > 1 {
		fmt.Println(2)
	} else {
		fmt.Println(r)
	}
}

package main

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

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

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

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

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

func main() {
	var l, r int64
	for I(&l, &r) == nil {
		solve(l, r)
	}
	w.Flush()
}

func solve(l, r int64) {
	if l == r {
		O(l, "\n")
	} else {
		O("2\n")
	}
}

package main

import (
	"fmt"
	"math"
)

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

	r_sqrt := int(math.Sqrt(float64(r)))
	not_prime := make([]bool, r_sqrt+1)
	for i := 2; i <= r_sqrt; i++ {
		for j := i; j <= r_sqrt; j++ {
			if i*j <= r_sqrt {
				not_prime[i*j] = true
			} else {
				break
			}
		}
	}
	primes := []int{2}
	for i := 3; i <= r_sqrt; i++ {
		if !not_prime[i] {
			primes = append(primes, i)
		}
	}

	if l != r || l%2 == 0 {
		fmt.Println(2)
	} else {
		for i := 0; i < len(primes); i++ {
			if l%primes[i] == 0 {
				fmt.Println(primes[i])
				return
			}
		}
		fmt.Println(l)
	}
}

package main

import (
	"fmt"
	"math"
)

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

	r_sqrt := int(math.Sqrt(float64(r)))
	not_prime := make([]bool, r_sqrt+1)
	for i := 2; i <= r_sqrt; i++ {
		for j := i; j <= r_sqrt; j++ {
			if i*j <= r_sqrt {
				not_prime[i*j] = true
			} else {
				break
			}
		}
	}
	primes := []int{2}
	for i := 3; i <= r_sqrt; i++ {
		if !not_prime[i] {
			primes = append(primes, i)
		}
	}

	if l != r || l%2 == 0 {
		fmt.Println(2)
	} else {
		for i := 0; i < len(primes); i++ {
			if l%primes[i] == 0 {
				fmt.Println(i)
				return
			}
		}
		fmt.Println(l)
	}
}

package main

import (
	"fmt"
	"math"
)

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

	r_sqrt := int(math.Sqrt(float64(r)))
	not_prime := make([]bool, r_sqrt+1)
	for i := 2; i <= r_sqrt; i++ {
		for j := i; j <= r_sqrt; j++ {
			if i*j <= r_sqrt {
				not_prime[i*j] = true
			} else {
				break
			}
		}
	}
	primes := []int{2}
	for i := 3; i <= r_sqrt; i++ {
		if !not_prime[3] {
			primes = append(primes, i)
		}
	}

	if l != r || l%2 == 0 {
		fmt.Println(2)
	} else {
		for i := 0; i < len(primes); i++ {
			if l%primes[i] == 0 {
				fmt.Println(i)
				return
			}
		}
		fmt.Println(l)
	}
}

package main

import (
	"fmt"
)

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

	if l > 6 {
		fmt.Println(2)
		return
	}

	div_map := make(map[int]int)
	for i := 2; i <= r/2; i++ {
		for j := l/i - 1; j <= r/2; j++ {
			if i*j > r {
				break
			} else if i*j >= l && i*j <= r {
				if i == j {
					div_map[i] += 1
				} else {
					div_map[i] += 1
					div_map[j] += 1
				}
			}
		}
	}

	max_k := 0
	max_v := 0
	for k, v := range div_map {
		if v > max_v {
			max_k = k
			max_v = v
		}
	}

	fmt.Println(max_k)
}

package main

import (
	"fmt"
)

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

	div_map := make(map[int]int)

	for i := 2; i <= r/2; i++ {
		for j := l/i - 1; j <= r/2; j++ {
			if i*j > r {
				break
			} else if i*j >= l && i*j <= r {
				if i == j {
					div_map[i] += 1
				} else {
					div_map[i] += 1
					div_map[j] += 1
				}
			}
		}
	}

	fmt.Println(div_map)

	max_k := 0
	max_v := 0
	for k, v := range div_map {
		if v > max_v {
			max_k = k
			max_v = v
		}
	}

	fmt.Println(max_k)
}

package main

import (
	"fmt"
)

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

	if l > 100 || r > 100 {
		if l != r || l%2 == 0 {
			fmt.Println(2)
		} else {
			for i := 3; i <= l; i++ {
				if l%i == 0 {
					fmt.Println(i)
					break
				}
			}
		}
	} else {
		div_map := make(map[int]int)
		for i := 2; i <= r/2; i++ {
			for j := l/i - 1; j <= r/2; j++ {
				if i*j > r {
					break
				} else if i*j >= l && i*j <= r {
					if i == j {
						div_map[i] += 1
					} else {
						div_map[i] += 1
						div_map[j] += 1
					}
				}
			}
		}

		max_k := 0
		max_v := 0
		for k, v := range div_map {
			if v > max_v {
				max_k = k
				max_v = v
			}
		}

		fmt.Println(max_k)
	}
}

package main

import "fmt"

func main() {
    var l, r int
    fmt.Scan(&l, &r)
    if r - l == 3 && l % 3 == 0 {
        fmt.Print(3)
    } else {
        fmt.Print(2)
    }
}

// cf805a project main.go
package main

import (
	"fmt"
)

func main() {
	var l, r int
	fmt.Scanln(&l, &r)
	if r-l > 3 || (r%2 == 0 || l%2 == 0) {
		fmt.Println(2)
	} else {
		fmt.Println(3)
	}
}

// cf805a project main.go
package main

import (
	"fmt"
)

func main() {
	var l, r int
	fmt.Scanln(&l, &r)
	if r-l > 3 {
		fmt.Println(2)
	} else {
		fmt.Println(3)
	}
}


// Test project main.go
package main

import (
	"fmt"
)

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

func min(a int, b int) int {
	if a < b {
		return a
	} else {
		return b
	}
}
func main() {
	var a int
	fmt.Scanf("%d", &a)
	amin := 2*(a/7) + max((a%7-5), 0)
	amax := 2*(a/7) + min(a%7, 2)
	fmt.Printf("%d %d\n", amin, amax)
}

package main

import "fmt"

func main() {
	var n int
	fmt.Scanln(&n)
	minDayOff := n / 7 * 2
	if n%7 > 5 {
		minDayOff += n%7 - 5
	}
	maxDayOff := 2
	if n < 2 {
		maxDayOff = n
		n = 0
	} else {
		n -= 2
	}
	maxDayOff += n / 7 * 2
	if n%7 > 5 {
		maxDayOff += n%7 - 5
	}
	fmt.Println(minDayOff, maxDayOff)
}

package main

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

func main() {
	var scanner *bufio.Scanner
	var n int
	var e error
	var min [6]int = [6]int{0, 0, 0, 0, 0, 1}
	var max [6]int = [6]int{1, 2, 2, 2, 2, 2}

	scanner = bufio.NewScanner(os.Stdin)

	scanner.Scan()

	n, e = strconv.Atoi(strings.TrimSpace(scanner.Text()))
	if e != nil {
		panic(e)
	}

	if n%7 == 0 {
		fmt.Println((n/7)*2, (n/7)*2)
	} else {
		fmt.Println(min[(n%7)-1]+(n/7)*2, max[(n%7)-1]+(n/7)*2)
	}
}

package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	r := n % 7
	var rmax, rmin int
	if r < 2 {
		rmax = r
	} else {
		rmax = 2
	}
	if r == 6 {
		rmin = 1
	} else {
		rmin = 0
	}
	max := n/7*2 + rmax
	min := n/7*2 + rmin
	fmt.Print(min, max)
}

package main

import "fmt"

func main() {
	var d int
	fmt.Scanf("%d", &d)
	mod := d % 7
	weeksCompleted := (d - mod) / 7
	weekend := weeksCompleted * 2
	minWeekend := weekend
	maxWeekend := weekend
	if mod > 1 {
		maxWeekend += 2
	}
	if mod == 1 {
		maxWeekend++
	}
	if mod > 5 {
		minWeekend++
	}
	fmt.Println(minWeekend, maxWeekend)
}

package main

import (
	"fmt"
)

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

func solve(n int) (mmin, mmax int) {
	if n%7 == 0 {
		week := n / 7
		return week * 2, week * 2
	}

	week := n / 7
	mod := n % 7

	mmax = week*2 + min(mod, 2)
	mmin = week * 2
	if mod == 6 {
		mmin++
	}

	return mmin, mmax
}

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

package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scanf("%v", &n)
	w := n / 7
	r := n % 7
	var a1, a2 int
	if r > 2 {
		a1 = 2*w + 2
	} else {
		a1 = 2*w + r
	}

	if r-5 > 0 {
		a2 = w*2 + (r - 5)
	} else {
		a2 = w * 2
	}

	fmt.Printf("%v %v\n", a2, a1)
}

package main

import (
	"fmt"
)
func main(){
	var n int
	fmt.Scanln(&n)
	week:=0
	days:=0
	days=n%7
	week=n/7
	holiday:=0
	if days==0{
		holiday=week*2
	}else if days==1 {
		holiday=(week*2)+1
	}else{
		holiday=(week*2)+2
	}
	min:=0
	if days==6{
		min=(week*2)+1
	}else if days==7 {
		min=(week*2)+2
	}else{
		min=week*2
	}

	fmt.Println(min, holiday)
}

package main

import "fmt"

func main() {
    var n int
    fmt.Scan(&n)
    var min, max int
    min, max = n/7 * 2, n/7 * 2
    if n%7 > 5 {
        min += (n%7)-5
        max += 2
    } else if n%7 < 2 {
        max += n%7
    } else {
        max += 2
    }
    fmt.Print(min, " ", max)
}

package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	week := n / 7
	day := n % 7
	var res1, res2 int
	res1, res2 = 0, 0
	res1 = week*2 + Max(0, day-5)
	res2 = week*2 + Min(2, day)

	fmt.Println(res1, res2)
}

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

// cf670a project main.go
package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)
	var ma int
	if n > 1 {
		ma = 2 + (((n - 2) / 7) * 2)
		if (n-2)%7 > 5 {
			ma += ((n - 2) % 7) - 5
		}
	} else {
		ma = n
	}
	mi := (n / 7) * 2
	if n%7 > 5 {
		mi += (n % 7) - 5
	}
	fmt.Println(mi, ma)
}

// Test project main.go
package main

import (
	"fmt"
)

func Generate(ch chan int) {
	now := 0
	sum := 0
	for {
		sum = sum + now
		now = now + 1
		ch <- now
		ch <- sum
	}
}
func main() {
	var n, x, ans int
	fmt.Scanf("%d %d", &n, &x)
	now := 0
	sum := 0

	for i := 1; i <= n; i++ {
		sum = sum + now
		now = now + 1
		//fmt.Printf("test %d %d\n", next, sum)
		if sum+now >= x && sum < x {
			ans = x - sum - 1
			break
			//fmt.Printf("%d\n", a[x-sum-1])
		}
	}
	for i := 0; i < n; i++ {
		var in int
		fmt.Scanf("%d", &in)
		//fmt.Printf("%d", in)
		if i == ans {
			fmt.Printf("%d", in)
		}
	}
}

package main

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

func main() {
	var scanner *bufio.Scanner
	var n int
	var e error
	var min [6]int = [6]int{0, 0, 0, 0, 0, 1}
	var max [7]int = [7]int{1, 2, 2, 2, 2, 2, 2}

	scanner = bufio.NewScanner(os.Stdin)

	scanner.Scan()

	n, e = strconv.Atoi(strings.TrimSpace(scanner.Text()))
	if e != nil {
		panic(e)
	}

	fmt.Println(min[(n-1)%6]+(n/7)*2, max[(n-1)%7]+(n/8)*2)

}

package main

import "fmt"

func main() {
	var d int
	fmt.Scanf("%d", &d)
	mod := d % 7
	weeksCompleted := (d - mod) / 7
	weekend := weeksCompleted * 2
	minWeekend := weekend
	maxWeekend := weekend
	if mod > 1 {
		maxWeekend += 2
	}
	if mod == 1 {
		maxWeekend++
	}
	fmt.Println(minWeekend, maxWeekend)
}

package main

import "fmt"

func main() {
    var n int
    fmt.Scan(&n)
    var min, max int
    min, max = n/7, n/7
    if n%7 > 5 {
        min += (n%7)-5
        max += 2
    } else if n%7 < 2 {
        max += n%7
    } else {
        max += 2
    }
    fmt.Print(min, " ", max)
}

// cf670a project main.go
package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)
	var ma int
	if ma > 1 {
		ma = 2 + (((n - 2) / 7) * 2)
		if (n-2)%7 > 5 {
			ma += ((n - 2) % 7) - 5
		}
	} else {
		ma = n
	}
	mi := (n / 7) * 2
	if n%7 > 5 {
		mi += (n % 7) - 5
	}
	fmt.Println(mi, ma)
}

// cf670a project main.go
package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)
	ma := 2 + (((n - 2) / 7) * 2)
	if (n-2)%7 > 5 {
		ma += ((n - 2) % 7) - 5
	}
	mi := (n / 7) * 2
	if n%7 > 5 {
		mi += (n % 7) - 5
	}
	fmt.Println(mi, ma)
}


package main

import (
	"fmt"
	"sort"
)

func next_permutation(idx []int) bool {
	n := len(idx)
	for i := n - 1; i >= 1; i-- {
		if idx[i] > idx[i-1] {
			idx[i], idx[i-1] = idx[i-1], idx[i]
			sort.Ints(idx[i:])
			return true
		}
	}

	return false
}

func main() {
	var n, a, b int
	fmt.Scanf("%d\n%d\n%d", &n, &a, &b)
	frames := make([]int, 6)
	idxs := make([]int, 6)
	for i := 0; i < 6; i++ {
		if i < 4 {
			frames[i] = a
		} else {
			frames[i] = b
		}
		idxs[i] = i
	}

	bestAnswer := 6
	for {
		count, leftover := 0, 0
		for i := 0; i < 6; i++ {
			if leftover < frames[idxs[i]] {
				count++
				leftover = n
			}
			leftover -= frames[idxs[i]]
		}
		if count < bestAnswer {
			bestAnswer = count
		}
		if !next_permutation(idxs) {
			break
		}
	}

	fmt.Println(bestAnswer)
}

package main

import (
  "fmt"
)

var n int32
var a int32
var b int32

func ReadData() {
  fmt.Scan(&n);
  fmt.Scan(&a);
  fmt.Scan(&b);
}

func Solve(na int32, nb int32, current int32, dbg bool) int {
  if na == 0 && nb == 0 {
    return 0;
  }

  var r0 int = 10000;
  var r1 int = 10000;
  var r2 int = 10000;
  var mode int = 4;

  if 0 < na && a <= current {
    r0 = Solve(na - 1, nb, current - a, false);
  }
  if 0 < nb && b <= current {
    r1 = Solve(na, nb - 1, current - b, false);
  }
  if current != n {
    r2 = 1 + Solve(na, nb, n, false);
  }

  result := r0
  mode = 0
  if r1 < result {
    result = r1
    mode = 1
  }
  if r2 < result {
    result = r2
    mode = 2
  }

  if dbg {
    if mode == 0 {
      Solve(na - 1, nb, current - a, true);
    } else if mode == 1 {
      Solve(na, nb - 1, current - b, true);
    } else if mode == 2 {
    r2 = 1 + Solve(na, nb, n, true);
    }
    fmt.Println("na: ", na, " nb: ", nb, " current: ", current, " result: ", result, " mode: ", mode)
  }
  return result
}

func main() {
  ReadData();
  fmt.Println(Solve(4, 2, 0, false));
}

package main

import (
	"fmt"
	"sort"
)

func main() {
	var n, a, b int
	fmt.Scanf("%d\n%d\n%d", &n, &a, &b)
	frames := make([]int, 6)
	for i := 0; i < 6; i++ {
		if i < 4 {
			frames[i] = a
		} else {
			frames[i] = b
		}
	}
	sort.Ints(frames)
	count := 0
	leftover := 0

	for i := 0; i < 6; i++ {
		if leftover >= frames[i] {
			leftover -= frames[i]
			continue
		}
		if i > 0 {
			if leftover+frames[i-1]-frames[i] >= 0 {
				count++
				leftover = n - frames[i-1]
				continue
			}
		}
		count++
		leftover = n - frames[i]
	}
	fmt.Println(count)
}

package main

import (
	"fmt"
	"sort"
)

func main() {
	var n, a, b int
	fmt.Scanf("%d\n%d\n%d", &n, &a, &b)
	frames := make([]int, 6)
	for i := 0; i < 6; i++ {
		if i < 4 {
			frames[i] = a
		} else {
			frames[i] = b
		}
	}
	sort.Ints(frames)
	count := 0
	leftover := 0

	for i := 0; i < 6; i++ {
		if leftover >= frames[i] {
			leftover -= frames[i]
			continue
		}
		if i > 0 {
			if leftover+frames[i-1]-frames[i] >= 0 {
				count++
				leftover = n - frames[i]
				continue
			}
		}
		count++
		leftover = n - frames[i]
	}
	fmt.Println(count)
}

package main

import (
	"fmt"
	"sort"
)

func main() {
	var n, a, b int
	fmt.Scanf("%d\n%d\n%d", &n, &a, &b)
	frames := make([]int, 6)
	for i := 0; i < 6; i++ {
		if i < 4 {
			frames[i] = a
		} else {
			frames[i] = b
		}
	}
	sort.Ints(frames)
	count := 0
	leftover := 0

	for i := 0; i < 6; i++ {
		if leftover >= frames[i] {
			leftover -= frames[i]
			continue
		}
		if i > 0 {
			if leftover+frames[i-1]+frames[i] >= 0 {
				count++
				leftover = n - frames[i-1]
				continue
			}
		}
		count++
		leftover = n - frames[i]
	}
	fmt.Println(count)
}

package main

import (
  "fmt"
)

var n int32
var a int32
var b int32

func ReadData() {
  fmt.Scanf("%d", &n);
  fmt.Scanf("%d", &a);
  fmt.Scanf("%d", &b);
}

func Solve(na int32, nb int32, current int32) int {
  if na == 0 && nb == 0 {
    return 0;
  }

  var r0 int = 1000;
  var r1 int = 1000;
  var r2 int = 1000;

  if 0 < na && a <= current {
    r0 = Solve(na - 1, nb, current - a);
  }
  if 0 < nb && b <= current {
    r1 = Solve(na, nb - 1, current - b);
  }
  if current < a && current < b {
    r2 = 1 + Solve(na, nb, n);
  }
  result := r0
  if r1 < result {
    result = r1
  }
  if r2 < result {
    result = r2
  }

  return result
}

func main() {
  ReadData();
  fmt.Println(Solve(4, 2, 0));
}

package main

import (
  "fmt"
)

var n int32
var a int32
var b int32

func ReadData() {
  fmt.Scanf("%d", &n);
  fmt.Scanf("%d", &a);
  fmt.Scanf("%d", &b);
}

func Solve(na int32, nb int32, current int32) int {
  if na == 0 && nb == 0 {
    return 0;
  }

  var r0 int = 1000;
  var r1 int = 1000;
  var r2 int = 1000;

  if 0 < na && a <= current {
    r0 = Solve(na - 1, nb, current - a);
  }
  if 0 < nb && b <= current {
    r1 = Solve(na, nb - 1, current - b);
  }
  if n != current {
    r2 = 1 + Solve(na, nb, n);
  }
  result := r0
  if r1 < result {
    result = r1
  }
  if r2 < result {
    result = r2
  }

  return result
}

func main() {
  ReadData();
  fmt.Println(Solve(4, 2, 0));
}

package main

import (
  "fmt"
)

var n int32
var a int32
var b int32

func ReadData() {
  fmt.Scanf("%d", &n);
  fmt.Scanf("%d", &a);
  fmt.Scanf("%d", &b);
}

func Solve(na int32, nb int32, current int32) int {
  if na == 0 && nb == 0 {
    return 0;
  }

  var result int = 1000;
  var r0 int = 1000;
  var r1 int = 1000;
  var r2 int = 1000;

  if 0 < na && a <= current {
    r0 = Solve(na - 1, nb, current - a);
  }
  if 0 < nb && b <= current {
    r1 = Solve(na, nb - 1, current - b);
  }
  if n != current {
    r2 = 1 + Solve(na, nb, n);
  }
  result = r0
  if r1 < r0 {
    result = r1
  }
  if r2 < result {
    result = r2
  }

  return result
}

func main() {
  ReadData();
  fmt.Println(1 + Solve(4, 2, n));
}

package main

import (
  "fmt"
)

var n int32
var a int32
var b int32

func ReadData() {
  fmt.Scanf("%d", &n);
  fmt.Scanf("%d", &a);
  fmt.Scanf("%d", &b);
}

func Solve(na int32, nb int32, current int32, dbg bool) int {
  if na == 0 && nb == 0 {
    return 0;
  }

  var r0 int = 10000;
  var r1 int = 10000;
  var r2 int = 10000;
  var mode int = 4;

  if 0 < na && a <= current {
    r0 = Solve(na - 1, nb, current - a, false);
  }
  if 0 < nb && b <= current {
    r1 = Solve(na, nb - 1, current - b, false);
  }
  if current != n {
    r2 = 1 + Solve(na, nb, n, false);
  }

  result := r0
  mode = 0
  if r1 < result {
    result = r1
    mode = 1
  }
  if r2 < result {
    result = r2
    mode = 2
  }

  if dbg {
    if mode == 0 {
      Solve(na - 1, nb, current - a, true);
    } else if mode == 1 {
      Solve(na, nb - 1, current - b, true);
    } else if mode == 2 {
    r2 = 1 + Solve(na, nb, n, true);
    }
    fmt.Println("na: ", na, " nb: ", nb, " current: ", current, " result: ", result, " mode: ", mode)
  }
  return result
}

func main() {
  ReadData();
  fmt.Println(Solve(4, 2, 0, false));
}


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

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

var (
        n int
        k int
        t int
)

func main() {
        fmt.Scanf("%d %d %d\n", &n, &k, &t)
        if t <= k {
                fmt.Println(t)
        } else if t >= n {
                fmt.Println(n + k - t)
        } else {
                fmt.Println(k)
        }
}

package main

import "fmt"

func main(){
	var n,k,t int
	fmt.Scanf("%d %d %d",&n,&k,&t)
	if t<=k{
		fmt.Println(t)
	} else{
		if t<=n {
			fmt.Println(k)
		}else {
			fmt.Println(k-(t-n))
		}
	}
}

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


/*
URL:
https://codeforces.com/problemset/problem/787/A
*/

package main

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

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

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

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

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

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

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

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	a, b, c, d int
)

func main() {
	a, b, c, d = ReadInt4()

	for i := 0; i <= 3000; i++ {
		for j := 0; j <= 3000; j++ {
			if b+i*a == d+j*c {
				fmt.Println(b + i*a)
				return
			}
		}
	}
	fmt.Println(-1)
}

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

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

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

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	return res
}

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

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

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

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

	return string(res)
}

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

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

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

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

package main

import (
	"fmt"
)

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

	offset := make(map[int]bool)

	for i := 0; ; i++ {
		t := i*a + b
		if t-d >= 0 {
			if (t-d)%c == 0 {
				fmt.Println(t)
				return
			}
			l := (t - d) / c
			off := t - (l*c + d)
			if offset[off] {
				break
			} else {
				offset[off] = true
			}
		}
	}

	fmt.Println(-1)
}

package main

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

func solve() {
	a := readInt()
	b := readInt()
	c := readInt()
	d := readInt()
	for i := 0; i < 100000; i++ {
		if i >= b && i >= d {
			if (i-b)%a == 0 && (i-d)%c == 0 {
				fmt.Println(i)
				return
			}
		}
	}
	fmt.Println(-1)
}

var scanner *bufio.Scanner

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

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

// IO

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

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

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

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

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

package main

import (
	"fmt"
)

func main() {
	var a, b, c, d, i int
	var arr1, arr2 []int
	var flag bool
	fmt.Scanf("%d %d\n%d %d", &a, &b, &c, &d)
	for i != 6000 {
		arr1 = append(arr1, b+(i*a))
		arr2 = append(arr2, d+(i*c))
		i++
	}
	for i := range arr1 {
		for j := range arr2 {
			if arr1[i] == arr2[j] {
				fmt.Println(arr1[i])
				flag = true
				break
			}
		}
		if flag {
			break
		}
	}
	if !flag {
		fmt.Println("-1")
	}
}

package main

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

func main() {
	var i, tmp int
	var arr1, arr2 []int
	var arr3 [4]int
	var flag bool
	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)
	line, _ := reader.ReadString('\n')
	arrS := strings.Split(strings.TrimSpace(line), " ")
	for i := range arrS {
		tmp, _ = strconv.Atoi(arrS[i])
		arr3[i] = tmp
	}
	line, _ = reader.ReadString('\n')
	arrS = strings.Split(strings.TrimSpace(line), " ")
	for i := range arrS {
		tmp, _ = strconv.Atoi(arrS[i])
		arr3[i+2] = tmp
	}
	i = 0
	for i != 6000 {
		arr1 = append(arr1, arr3[1]+(i*arr3[0]))
		arr2 = append(arr2, arr3[3]+(i*arr3[2]))
		i++
	}
	i = 0
	for j := range arr1 {
		x := arr1[j]
		i := sort.Search(len(arr2), func(i int) bool { return arr2[i] >= x })
		if i < len(arr2) && arr2[i] == x {
			writer.WriteString(strconv.Itoa(x))
			flag = true
			break
		}
	}
	if !flag {
		writer.WriteString("-1")
	}
	writer.Flush()
}

package main
import ."fmt"

func main(){
    var a , b , c , d int
    Scanf("%d%d\n" , &a , &b)
    Scanf("%d%d" , &c , &d)
    mapper := make([]int , 1e6+5)
    for i:=b; i<= 1e6; i+=a{
        mapper[i] += 1
    }
    ans := -1
    for i:=d; i<= 1e6; i+=c{
        mapper[i] += 1
        if mapper[i] == 2{
            ans = i
            break
        }
    }
    Printf("%d" , ans)
}

package main

import "fmt"
import "os"

func main(){
	var a , b , c , d int
	fmt.Scanf("%d%d\n" , &a , &b)
	fmt.Scanf("%d%d" , &c , &d)
	for i:=0 ; i<=110 ; i++ {
		if (b+i*a-d) % c == 0 && b+i*a-d >= 0 {
			fmt.Printf("%d\n" ,b+i*a)
			os.Exit(0)
		}
	}
	fmt.Printf("-1\n")
}

package main

import "fmt"
import "os"

func main(){
	var a , b , c , d int
	fmt.Scanf("%d%d%d%d" , a , b , c , d)
	if b == d {
		fmt.Printf("%d\n", d)
		os.Exit(0)
	}
	for i:=0 ; i<=110 ; i++ {
		if (b+i*a-d) % c == 0 {
			fmt.Printf("%d\n" ,b+i*a)
			os.Exit(0)
		}
	}
	fmt.Printf("-1\n")
}

package main

import "fmt"
import "os"

func main(){
	var a , b , c , d int
	fmt.Scanf("%d%d\n" , &a , &b)
	fmt.Scanf("%d%d" , &c , &d)
	for i:=0 ; i<=110 ; i++ {
		if (b+i*a-d) % c == 0 {
			fmt.Printf("%d\n" ,b+i*a)
			os.Exit(0)
		}
	}
	fmt.Printf("-1\n")
}


package main

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

var scanner *bufio.Scanner = bufio.NewScanner(os.Stdin)

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

func main() {
	x1, y1 := results()
	x2, y2 := results()
	x3, y3 := results()
	fmt.Println("3")
	fmt.Println(x2-x1+x3, y2-y1+y3)
	fmt.Println(x3-x2+x1, y3-y2+y1)
	fmt.Println(x1-x3+x2, y1-y3+y2)
}

func results() (int, int) {
	scanner.Scan()
	result := strings.Fields(scanner.Text())
	x, err1 := strconv.Atoi(result[0])
	y, err2 := strconv.Atoi(result[1])
	if err1 == nil && err2 == nil {
		return x, y
	} else {
		return 0, 0
	}
}

package main

import (
	"fmt"
)

func main() {
	var xy [3][2]int

	for i := 0; i < 3; i++ {
		if _, err := fmt.Scanf("%d %d\n", &xy[i][0], &xy[i][1]); err != nil {
			return
		}
	}

	fmt.Println(3)
	for i := 0; i < 3; i++ {
		var c, o [2]int
		for j := 0; j < 3; j++ {
			if j != i {
				for k := 0; k < 2; k++ {
					c[k] += xy[j][k]
				}
			}
		}
		for k := 0; k < 2; k++ {
			o[k] = c[k] - xy[i][k]
		}

		fmt.Println(o[0], o[1])
	}
}

// Codeforces 749 B training
// int - 32 bit type !!!!
package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
	"strconv"
)
var in *bufio.Reader

func readFive() (int,int,int,int,int) {
    var a [5]int
	s, err := in.ReadString('\n')
	if err != nil {
		fmt.Println("first read failure", err)
		panic(err)
	}
	ss := strings.Split(strings.Trim(s, " \n\r"), " ")
    for i:=0; i<len(ss); i++ {
        a[i], err = strconv.Atoi(ss[i])
        if err != nil {
            fmt.Println("n atoi failure", err)
            panic(err)
        }
    }
    return a[0],a[1],a[2],a[3],a[4]
}

func readLineNumbs(n int) []int {
    a := make([]int, n)
    s, err := in.ReadString('\n')
    if err != nil {
        fmt.Println("read failure", err)
        panic(err)
    }
    ss := strings.Split(strings.Trim(s, " \n\r"), " ")
    for j:=0; j<n; j++ {
        aa,err := strconv.Atoi(ss[j])
        if err != nil {
            fmt.Println("aa conv failed", err)
            panic(err)
        }
        a[j] = aa
    }
    return a
}

type point struct {
	x,y int
}
var n int
var pa,pb,pc point
var rp []point

func readPoint() point {
	x,y,_,_,_ := readFive()
	p := point{x,y}
	return p
}

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

func readData() {
 	in = bufio.NewReader(os.Stdin)
	// reading s
    pa = readPoint()
    pb = readPoint()
    pc = readPoint()
}

func fourthPoint(a point,b,c point) point {
	xx := b.x + c.x - a.x;
	yy := b.y + c.y - a.y;
	p := point{xx,yy}
	return p
}

func solve() {
	n = 3
	rp = make([]point, n)
	rp[0] = fourthPoint(pa, pb, pc)
	rp[1] = fourthPoint(pb, pc, pa)
	rp[2] = fourthPoint(pc, pa, pb)
}

func printRes() {
	fmt.Println(n)
	for i:=0; i<n; i++ {
		printPoint(rp[i])
	}
}

func main() {
 	readData()
    solve()
    printRes()
}

package main

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

func main() {
	type Tuple        struct {
		x int
		y int
	}
	sc := NewScanner()
	X := make([]int, 3)
	Y := make([]int, 3)

	for i := 0; i < 3; i++ {
		X[i], Y[i] = sc.NextInt(), sc.NextInt()
	}
	mp := map[Tuple]bool{}
	for i := 0; i < 3; i++ {
		for j := i + 1; j < 3; j++ {
			x := X[i] - X[j]
			y := Y[i] - Y[j]

			for k := 0; k < 3; k++ {
				if k == i || k == j {
					continue
				}
				mp[Tuple{X[k] + x, Y[k] + y}] = true
				mp[Tuple{X[k] - x, Y[k] - y}] = true
			}
		}
	}
	fmt.Println(len(mp))
	for k, _ := range mp {
		fmt.Println(k.x, k.y)
	}

}

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

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

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

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

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

	return mp
}

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

package main

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

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

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

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

func main() {
	if f, err := os.Open("in.txt"); err == nil {
		r = bufio.NewReader(f)
	} else {
		r = bufio.NewReader(os.Stdin)
	}
	w = bufio.NewWriter(os.Stdout)
	defer w.Flush()
	var x1 int
	for I(&x1, " ") == nil {
		solve(x1)
	}
}
func solve(x1 int) {
	var y1, x2, y2, x3, y3 int
	I(&y1, "\n")
	I(&x2, " ")
	I(&y2, "\n")
	I(&x3, " ")
	I(&y3, "\n")
	O(3, "\n")
	O(x1+x2-x3, " ")
	O(y1+y2-y3, "\n")
	O(x1-x2+x3, " ")
	O(y1-y2+y3, "\n")
	O(-x1+x2+x3, " ")
	O(-y1+y2+y3, "\n")
}

package main

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

var scanner *bufio.Scanner = bufio.NewScanner(os.Stdin)

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

func main() {
	//var x1 ,x2,x3,y1,y2,y3 int
	scanner.Scan()
	words := strings.Fields(scanner.Text())
	scanner.Scan()
	words = strings.Fields(scanner.Text())
	fmt.Println(words[0])
	fmt.Println(words[1])
	//fmt.Println("3")
	//fmt.Println(x2-x1+x3, y2-y1+y3)
	//fmt.Println(x3-x2+x1, y3-y2+y1)
	//fmt.Println(x1-x3+x2, y1-y3+y2)
}

package main

import (
	"fmt"
)

func main() {
	var x1 ,x2,x3,y1,y2,y3 int
	fmt.Scanf("%d %d", &x1, &y1)
	fmt.Scanf("%d %d", &x2, &y2)
	fmt.Scanf("%d %d", &x3, &y3)
	fmt.Println("3")
	fmt.Println(y1)
	fmt.Println(x2-x1+x3, y2-y1+y3)
	fmt.Println(x3-x2+x1, y3-y2+y1)
	fmt.Println(x1-x3+x2, y1-y3+y2)
}

package main

import (
	"fmt"
)

func main() {
	var x1 ,x2,x3,y1,y2,y3 int
	fmt.Scanf("%d %d", &x1, &y1)
	fmt.Scanf("%d %d", &x2, &y2)
	fmt.Scanf("%d %d", &x3, &y3)
	fmt.Println("3")
	fmt.Printf("%d ", x2-x1+x3)
	fmt.Printf("%d ", y2-y1+y3)
	fmt.Println()
	fmt.Printf("%d ", x3-x2+x1)
	fmt.Printf("%d ", y3-y2+y1)
	fmt.Println()
	fmt.Printf("%d ", x1-x3+x2)
	fmt.Printf("%d ", y1-y3+y2)
}

package main

import (
	"fmt"
)

func main() {
	var x1 ,x2,x3,y1,y2,y3 int
	fmt.Scanf("%d%d", &x1, &y1)
	fmt.Scanf("%d%d", &x2, &y2)
	fmt.Scanf("%d%d", &x3, &y3)
	fmt.Println("3")
	fmt.Println(x2-x1+x3, y2-y1+y3)
	fmt.Println(x3-x2+x1, y3-y2+y1)
	fmt.Println(x1-x3+x2, y1-y3+y2)
}

package main

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

var scanner *bufio.Scanner = bufio.NewScanner(os.Stdin)

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

func main() {
	//var x1 ,x2,x3,y1,y2,y3 int
	scanner.Scan()
	words := strings.Fields(scanner.Text())
	fmt.Println(words[0])
	fmt.Println(words[1])
	//fmt.Println("3")
	//fmt.Println(x2-x1+x3, y2-y1+y3)
	//fmt.Println(x3-x2+x1, y3-y2+y1)
	//fmt.Println(x1-x3+x2, y1-y3+y2)
}

package main

import (
	"fmt"
)

func main() {
	var x1 ,x2,x3,y1,y2,y3 int
	fmt.Scanf("%d", &x1)
	fmt.Scanf("%d", &y1)
	fmt.Scanf("%d", &x2)
	fmt.Scanf("%d", &y2)
	fmt.Scanf("%d", &x3)
	fmt.Scanf("%d", &y3)
	fmt.Println("3")
	fmt.Println(x2-x1+x3, y2-y1+y3)
	fmt.Println(x3-x2+x1, y3-y2+y1)
	fmt.Println(x1-x3+x2, y1-y3+y2)
}

package main

import (
	"fmt"
)

func main() {
	var x1 ,x2,x3,y1,y2,y3 int
	fmt.Scanf("%d %d", &x1, &y1)
	fmt.Scanf("%d %d", &x2, &y2)
	fmt.Scanf("%d %d", &x3, &y3)
	fmt.Println("3")
	fmt.Println(x2-x1+x3, y2-y1+y3)
	fmt.Println(x3-x2+x1, y3-y2+y1)
	fmt.Println(x1-x3+x2, y1-y3+y2)
}