← Home
package main

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

type Point struct {
	x, y         int64
	is_even_even bool
	removable    bool
	idx          int
}

func cross(A, B, C Point) int64 {
	return (B.x-A.x)*(C.y-A.y) - (B.y-A.y)*(C.x-A.x)
}

func getFullHull(P []Point, skipIdx int) []Point {
	var lower []Point
	for _, p := range P {
		if p.idx == skipIdx {
			continue
		}
		for len(lower) >= 2 && cross(lower[len(lower)-2], lower[len(lower)-1], p) <= 0 {
			lower = lower[:len(lower)-1]
		}
		lower = append(lower, p)
	}
	var upper []Point
	for _, p := range P {
		if p.idx == skipIdx {
			continue
		}
		for len(upper) >= 2 && cross(upper[len(upper)-2], upper[len(upper)-1], p) >= 0 {
			upper = upper[:len(upper)-1]
		}
		upper = append(upper, p)
	}
	visited := make(map[int]bool)
	var hull []Point
	for _, p := range lower {
		if !visited[p.idx] {
			visited[p.idx] = true
			hull = append(hull, p)
		}
	}
	for _, p := range upper {
		if !visited[p.idx] {
			visited[p.idx] = true
			hull = append(hull, p)
		}
	}
	return hull
}

func main() {
	reader := bufio.NewReader(os.Stdin)
	var N int
	if _, err := fmt.Fscan(reader, &N); err != nil {
		return
	}

	P := make([]Point, N)
	hasOrigin := false
	for i := 0; i < N; i++ {
		fmt.Fscan(reader, &P[i].x, &P[i].y)
		P[i].is_even_even = (P[i].x%2 == 0) && (P[i].y%2 == 0)
		P[i].removable = true
		if P[i].x == 0 && P[i].y == 0 {
			hasOrigin = true
			P[i].removable = false
		}
	}

	if !hasOrigin {
		P = append(P, Point{x: 0, y: 0, is_even_even: true, removable: false})
	}

	sort.Slice(P, func(i, j int) bool {
		if P[i].x == P[j].x {
			return P[i].y < P[j].y
		}
		return P[i].x < P[j].x
	})

	for i := range P {
		P[i].idx = i
	}

	hull := getFullHull(P, -1)
	for _, p := range hull {
		if !p.is_even_even {
			fmt.Println("Ani")
			return
		}
	}

	var lower []Point
	for _, p := range P {
		for len(lower) >= 2 && cross(lower[len(lower)-2], lower[len(lower)-1], p) <= 0 {
			lower = lower[:len(lower)-1]
		}
		lower = append(lower, p)
	}

	var upper []Point
	for _, p := range P {
		for len(upper) >= 2 && cross(upper[len(upper)-2], upper[len(upper)-1], p) >= 0 {
			upper = upper[:len(upper)-1]
		}
		upper = append(upper, p)
	}

	isEndpoint := make(map[int]bool)
	if len(lower) > 0 {
		isEndpoint[lower[0].idx] = true
		isEndpoint[lower[len(lower)-1].idx] = true
	}
	if len(upper) > 0 {
		isEndpoint[upper[0].idx] = true
		isEndpoint[upper[len(upper)-1].idx] = true
	}

	checked := make(map[int]bool)

	for i := 1; i < len(lower)-1; i++ {
		v := lower[i]
		if checked[v.idx] {
			continue
		}
		checked[v.idx] = true
		if !v.removable {
			continue
		}

		if isEndpoint[v.idx] {
			newHull := getFullHull(P, v.idx)
			for _, np := range newHull {
				if !np.is_even_even {
					fmt.Println("Ani")
					return
				}
			}
			continue
		}

		startIdx := lower[i-1].idx
		endIdx := lower[i+1].idx
		var loc []Point
		for j := startIdx; j <= endIdx; j++ {
			if P[j].idx == v.idx {
				continue
			}
			p := P[j]
			for len(loc) >= 2 && cross(loc[len(loc)-2], loc[len(loc)-1], p) <= 0 {
				loc = loc[:len(loc)-1]
			}
			loc = append(loc, p)
		}
		for _, np := range loc {
			if !np.is_even_even {
				fmt.Println("Ani")
				return
			}
		}
	}

	for i := 1; i < len(upper)-1; i++ {
		v := upper[i]
		if checked[v.idx] {
			continue
		}
		checked[v.idx] = true
		if !v.removable {
			continue
		}

		if isEndpoint[v.idx] {
			newHull := getFullHull(P, v.idx)
			for _, np := range newHull {
				if !np.is_even_even {
					fmt.Println("Ani")
					return
				}
			}
			continue
		}

		startIdx := upper[i-1].idx
		endIdx := upper[i+1].idx
		var loc []Point
		for j := startIdx; j <= endIdx; j++ {
			if P[j].idx == v.idx {
				continue
			}
			p := P[j]
			for len(loc) >= 2 && cross(loc[len(loc)-2], loc[len(loc)-1], p) >= 0 {
				loc = loc[:len(loc)-1]
			}
			loc = append(loc, p)
		}
		for _, np := range loc {
			if !np.is_even_even {
				fmt.Println("Ani")
				return
			}
		}
	}

	for idx := range isEndpoint {
		if !P[idx].removable {
			continue
		}
		if checked[idx] {
			continue
		}
		checked[idx] = true
		newHull := getFullHull(P, idx)
		for _, np := range newHull {
			if !np.is_even_even {
				fmt.Println("Ani")
				return
			}
		}
	}

	fmt.Println("Borna")
}