Gerald is very particular to eight point sets. He thinks that any decent eight point set must consist of all pairwise intersections of three distinct integer vertical straight lines and three distinct integer horizontal straight lines, except for the average of these nine points. In other words, there must be three integers x_1, x_2, x_3 and three more integers y_1, y_2, y_3, such that x_1 < x_2 < x_3, y_1 < y_2 < y_3 and the eight point set consists of all points (x_{i}, y_{j}) (1 ≤ i, j ≤ 3), except for point (x_2, y_2).

You have a set of eight points. Find out if Gerald can use this set?


-----Input-----

The input consists of eight lines, the i-th line contains two space-separated integers x_{i} and y_{i} (0 ≤ x_{i}, y_{i} ≤ 10^6). You do not have any other conditions for these points.


-----Output-----

In a single line print word "respectable", if the given set of points corresponds to Gerald's decency rules, and "ugly" otherwise.


-----Examples-----
Input
0 0
0 1
0 2
1 0
1 2
2 0
2 1
2 2

Output
respectable

Input
0 0
1 0
2 0
3 0
4 0
5 0
6 0
7 0

Output
ugly

Input
1 1
1 2
1 3
2 1
2 2
2 3
3 1
3 2

Output
ugly

Difficulty: MEDIUM

Solutions:
s = set()
w = set()
d = dict()
for _ in range(8):
	l = list(map(int, input().split()))
	s.add(l[0])
	w.add(l[1])
	if l[0] in d:
		d[l[0]].append(l[1])
		d[l[0]].sort()
	else:
		d[l[0]] = list()
		d[l[0]].append(l[1])
	if len(d) > 3:
		print('ugly')
		exit()
if len(s) < 3 or len(w) < 3 or len(s) > 3 or (len(w) > 3):
	print('ugly')
	exit()
a = sorted(d.keys())
if sorted(d[a[0]]) != sorted(list(w)):
	print('ugly')
	exit()
if sorted(d[a[2]]) != sorted(list(w)):
	print('ugly')
	exit()
r = list(w)
r.sort()
if r[1] in d[a[1]]:
	print('ugly')
	exit()
elif r[0] in d[a[1]] and r[2] in d[a[1]]:
	d[a[1]].remove(r[0])
	d[a[1]].remove(r[2])
	if len(d[a[1]]) == 0:
		print('respectable')
		exit()
	else:
		print('ugly')
		exit()
else:
	print('ugly')
	exit()
print('respectable')


class Coordinate:

	def __init__(self, x, y):
		self.x = x
		self.y = y

	def __lt__(self, other):
		if self.x < other.x:
			return True
		if self.x == other.x and self.y < other.y:
			return True
		return False
a = []
for i in range(8):
	(x, y) = map(int, input().split(' '))
	a.append(Coordinate(x, y))
a.sort()
if a[0].x == a[1].x == a[2].x and a[3].x == a[4].x and (a[5].x == a[6].x == a[7].x) and (a[0].y == a[3].y == a[5].y) and (a[1].y == a[6].y) and (a[2].y == a[4].y == a[7].y) and (a[0].x < a[3].x < a[5].x) and (a[0].y < a[1].y < a[2].y):
	print('respectable')
else:
	print('ugly')


(x, y) = ([], [])
(xx, yy) = ({}, {})
for i in range(8):
	(a, b) = map(int, input().split())
	x.append(a)
	y.append(b)
	if a not in xx:
		xx[a] = [b]
	else:
		xx[a].append(b)
	if b not in yy:
		yy[b] = [a]
	else:
		yy[b].append(a)
if len(set(x)) != 3 or len(set(y)) != 3:
	print('ugly')
	exit()
(xxx, yyy) = (sorted(set(x)), sorted(set(y)))
if set(xx[xxx[1]]) != {yyy[0], yyy[2]}:
	print('ugly')
	exit()
if set(yy[yyy[1]]) != {xxx[0], xxx[2]}:
	print('ugly')
	exit()
if len(set(xx[xxx[0]])) != 3 or 3 != len(set(xx[xxx[2]])) or len(set(yy[yyy[0]])) != 3 or (3 != len(set(yy[yyy[2]]))):
	print('ugly')
	exit()
print('respectable')


def solve():
	x = [0] * 8
	y = [0] * 8
	xy = [None] * 8
	for i in range(0, 8):
		line = input()
		if line == '':
			line = input()
		(x[i], y[i]) = map(int, line.split())
		xy[i] = (x[i], y[i])
	a = sorted(x)
	b = sorted(y)
	x1 = a[0]
	x2 = a[3]
	x3 = a[7]
	y1 = b[0]
	y2 = b[3]
	y3 = b[7]
	if x1 == x2 or x1 == x3 or x2 == x3 or (y1 == y2) or (y1 == y3) or (y2 == y3):
		print('ugly')
		return
	if a[0] != a[1] or a[0] != a[2] or a[3] != a[4] or (a[5] != a[6]) or (a[6] != a[7]):
		print('ugly')
		return
	if b[0] != b[1] or b[0] != b[2] or b[3] != b[4] or (b[5] != b[6]) or (b[6] != b[7]):
		print('ugly')
		return
	for i in range(8):
		if x[i] == x2 and y[i] == y2:
			print('ugly')
			return
		for j in range(i + 1, 8):
			if xy[i] == xy[j]:
				print('ugly')
				return
	print('respectable')
solve()


a = []

def f(n):
	return n[0]

def ff(n):
	return n[1]
for i in range(8):
	(x, y) = map(int, input().split())
	if [x, y] in a:
		print('ugly')
		exit()
	a.append([x, y])
a.sort(key=f)
k = 0
if a[0][0] == a[1][0] and a[1][0] == a[2][0]:
	k += 1
	if a[2][0] != a[3][0]:
		if a[3][0] == a[4][0]:
			k += 1
			if a[5][0] != a[4][0]:
				if a[5][0] != a[0][0]:
					if a[5][0] == a[6][0] and a[6][0] == a[7][0]:
						k += 1
if k != 3:
	print('ugly')
	exit()
a.sort(key=ff)
if a[0][1] == a[1][1] and a[1][1] == a[2][1]:
	k += 1
	if a[2][1] != a[3][1]:
		if a[3][1] == a[4][1]:
			k += 1
			if a[5][1] != a[4][1]:
				if a[5][1] != a[0][1]:
					if a[5][1] == a[6][1] and a[6][1] == a[7][1]:
						k += 1
if k == 6:
	print('respectable')
else:
	print('ugly')


import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right, bisect
row = defaultdict(lambda : 0)
col = defaultdict(lambda : 0)
s = set()
for _ in range(8):
	(x, y) = map(int, stdin.readline().split())
	row[x] += 1
	col[y] += 1
	s.add(tuple([x, y]))
rows = []
cols = []
if len(row.keys()) != 3 and len(col.keys()) != 3:
	print('ugly')
else:
	for i in row.keys():
		rows.append([i, row[i]])
	for i in col.keys():
		cols.append([i, col[i]])
	rows.sort()
	cols.sort()
	if rows[0][1] != 3 or rows[1][1] != 2 or rows[2][1] != 3:
		print('ugly')
	elif cols[0][1] != 3 or cols[1][1] != 2 or cols[2][1] != 3:
		print('ugly')
	elif len(s) != 8:
		print('ugly')
	else:
		print('respectable')


sets = []
for i in range(8):
	(x, y) = map(int, input().split())
	sets.append((x, y))
a1 = sorted(sets, key=lambda point: point[0])
pointx = []
for i in range(len(a1)):
	if len(pointx) == 0:
		pointx.append(a1[i][0])
	elif pointx[-1] != a1[i][0]:
		pointx.append(a1[i][0])
	if len(pointx) > 3:
		print('ugly')
		exit()
if len(pointx) != 3:
	print('ugly')
	exit()
a2 = sorted(sets, key=lambda point: point[1])
pointy = []
for i in range(len(a2)):
	if len(pointy) == 0:
		pointy.append(a2[i][1])
	elif pointy[-1] != a2[i][1]:
		pointy.append(a2[i][1])
	if len(pointy) > 3:
		print('ugly')
		exit()
if len(pointy) != 3:
	print('ugly')
	exit()
for i in range(len(sets)):
	if (sets[i][0] == pointx[0]) & (sets[i][1] == pointy[0]):
		break
	if i == 7:
		print('ugly')
		exit()
for i in range(len(sets)):
	if (sets[i][0] == pointx[0]) & (sets[i][1] == pointy[1]):
		break
	if i == 7:
		print('ugly')
		exit()
for i in range(len(sets)):
	if (sets[i][0] == pointx[0]) & (sets[i][1] == pointy[2]):
		break
	if i == 7:
		print('ugly')
		exit()
for i in range(len(sets)):
	if (sets[i][0] == pointx[1]) & (sets[i][1] == pointy[0]):
		break
	if i == 7:
		print('ugly')
		exit()
for i in range(len(sets)):
	if (sets[i][0] == pointx[1]) & (sets[i][1] == pointy[2]):
		break
	if i == 7:
		print('ugly')
		exit()
for i in range(len(sets)):
	if (sets[i][0] == pointx[2]) & (sets[i][1] == pointy[2]):
		break
	if i == 7:
		print('ugly')
		exit()
for i in range(len(sets)):
	if (sets[i][0] == pointx[2]) & (sets[i][1] == pointy[1]):
		break
	if i == 7:
		print('ugly')
		exit()
for i in range(len(sets)):
	if (sets[i][0] == pointx[2]) & (sets[i][1] == pointy[0]):
		break
	if i == 7:
		print('ugly')
		exit()
print('respectable')


def main():
	((x0, y0), (x1, y1), (x2, y2), (x3, y3), (x5, y5), (x6, y6), (x7, y7), (x8, y8)) = sorted([tuple(map(int, input().split())) for _ in range(8)])
	print(('ugly', 'respectable')[x0 == x1 == x2 < x3 == x5 < x6 == x7 == x8 and y0 == y3 == y6 < y1 == y7 < y2 == y5 == y8])
main()


import sys
a = []
b = []
for i in range(8):
	(x, y) = [int(k) for k in input().split()]
	a.append(x)
	b.append(y)
seta = set(a)
setb = set(b)
if len(seta) == 3 and len(setb) == 3:
	x = sorted(seta)
	y = sorted(setb)
	point = []
	for i in range(8):
		point.append((a[i], b[i]))
	if (x[1], y[1]) in point:
		print('ugly')
		sys.exit()
	for i in range(3):
		for j in range(3):
			if i == 1 and j == 1:
				continue
			elif (x[i], y[j]) not in point:
				print('ugly')
				sys.exit()
	print('respectable')
else:
	print('ugly')


a = [0] * 8
for i in range(8):
	a[i] = list(map(int, input().split(' ')))
x = []
y = []
for i in range(8):
	if a[i][0] not in x:
		x.append(a[i][0])
	if a[i][1] not in y:
		y.append(a[i][1])
if len(x) != 3 or len(y) != 3:
	print('ugly')
	exit()
x.sort()
y.sort()
l = [0] * 8
index = 0
for i in range(3):
	for j in range(3):
		if i == 1 and j == 1:
			continue
		l[index] = [x[i], y[j]]
		index += 1
for i in l:
	if i not in a:
		print('ugly')
		exit()
print('respectable')


class point:

	def __init__(self, x, y):
		self.x = x
		self.y = y

def _input():
	N = 8
	point_sets = []
	for i in range(0, N):
		(x, y) = map(int, input().split())
		point_sets.append(point(x, y))
	return point_sets

def eight_point_sets(point_sets):
	t = point_sets[:]
	t.sort(key=lambda a: a.x)
	t[0:3] = sorted(t[0:3], key=lambda a: a.y)
	t[3:5] = sorted(t[3:5], key=lambda a: a.y)
	t[5:] = sorted(t[5:], key=lambda a: a.y)
	for i in range(0, 4, 3):
		if t[i].x >= t[i + 3].x:
			return -1
	for i in range(0, 2):
		if t[i].y >= t[i + 1].y:
			return -1
	for i in range(0, 2):
		if t[i].x != t[i + 1].x:
			return -1
	if t[3].x != t[4].x:
		return -1
	for i in range(5, 7):
		if t[i].x != t[i + 1].x:
			return -1
	for i in range(0, 3):
		if t[i].y != t[i + 5].y:
			return -1
	if t[3].y != t[0].y:
		return -1
	if t[4].y != t[2].y:
		return -1
	return 0
point_sets = _input()
ret = eight_point_sets(point_sets)
if ret == 0:
	print('respectable')
else:
	print('ugly')


class Point:

	def __init__(self, x, y):
		self.x = x
		self.y = y

	def __lt__(self, other):
		return self.x < other.x or (self.x == other.x and self.y < other.y)
ux = []
uy = []
point = []
for i in range(8):
	(x, y) = map(int, input().split())
	point.append(Point(x, y))
	if x not in ux:
		ux.append(x)
	if y not in uy:
		uy.append(y)
if len(ux) != 3 or len(uy) != 3:
	print('ugly')
	exit()
ux.sort()
uy.sort()
point.sort()
cnt = 0
index = 0
for i in range(3):
	for j in range(3):
		if i == j == 1:
			continue
		if ux[i] == point[index].x and uy[j] == point[index].y:
			cnt += 1
			index += 1
if cnt != 8:
	print('ugly')
else:
	print('respectable')


def check():
	l = []
	for i in range(8):
		(x, y) = list(map(int, input().split()))
		l += [[x, y]]
	xSet = set()
	ySet = set()
	for (x, y) in l:
		xSet.add(x)
		ySet.add(y)
	if len(xSet) != 3 or len(ySet) != 3:
		return False
	xList = sorted(list(xSet))
	yList = sorted(list(ySet))
	z = []
	for x in xList:
		for y in yList:
			if x == xList[1] and y == yList[1]:
				pass
			else:
				z += [[x, y]]
	z.sort()
	l.sort()
	return z == l
if check():
	print('respectable')
else:
	print('ugly')


X = []
Y = []
Points = []
k = False
for i in range(8):
	(x, y) = map(int, input().split())
	X.append(x)
	Y.append(y)
	if [x, y] in Points:
		k = True
	Points.append([x, y])
X.sort()
Y.sort()
if len(set(X)) != 3 or len(set(Y)) != 3 or k:
	print('ugly')
elif X.count(X[0]) != 3 or X.count(X[3]) != 2 or X.count(X[5]) != 3:
	print('ugly')
elif Y.count(Y[0]) != 3 or Y.count(Y[3]) != 2 or Y.count(Y[5]) != 3:
	print('ugly')
elif [X[3], Y[3]] in Points:
	print('ugly')
else:
	print('respectable')


a = []
xDistinct = []
yDistinct = []
for i in range(0, 8):
	[n1, n2] = map(int, input().split())
	a.append([n1, n2])
	if n1 not in xDistinct:
		xDistinct.append(n1)
	if n2 not in yDistinct:
		yDistinct.append(n2)
countDistinctX = len(xDistinct)
countDistinctY = len(yDistinct)
if countDistinctX != 3 and countDistinctY != 3:
	print('ugly')
	exit()
xDistinct.sort()
yDistinct.sort()
a.sort()
index = 0
for i in range(3):
	for j in range(3):
		if i == j == 1:
			continue
		if xDistinct[i] != a[index][0] or yDistinct[j] != a[index][1]:
			print('ugly')
			exit()
		index = index + 1
print('respectable')


l = []
for i in range(8):
	(x, y) = [int(x) for x in input().split()]
	l.append((x, y))
l.sort()
lx = []
lx.append(l[0][0])
lx.append(l[3][0])
lx.append(l[6][0])
ly = []
ly.append(l[0][1])
ly.append(l[1][1])
ly.append(l[2][1])
eps = [(x, y) for x in lx for y in ly]
eps.pop(4)
if l == eps and lx[0] != lx[1] and (lx[0] != lx[2]) and (lx[1] != lx[2]) and (ly[0] != ly[1]) and (ly[0] != ly[2]) and (ly[1] != ly[2]):
	print('respectable')
else:
	print('ugly')


def main(temp):
	nums = []
	for item in temp:
		if item not in nums:
			nums.append(item)
		else:
			return 'ugly'
	Xs = [item[0] for item in nums]
	Ys = [item[1] for item in nums]
	Xset = list(set(Xs))
	Yset = list(set(Ys))
	if len(Xset) != 3 or len(Yset) != 3:
		return 'ugly'
	Xset.sort()
	Yset.sort()
	(a, b, c) = (Xs.count(Xset[0]), Xs.count(Xset[1]), Xs.count(Xset[2]))
	(q, w, e) = (Ys.count(Yset[0]), Ys.count(Yset[1]), Ys.count(Yset[2]))
	if a == c == q == e == 3 and b == w == 2:
		return 'respectable'
	else:
		return 'ugly'

def init():
	nums = []
	for i in range(8):
		nums.append(list(map(int, input().split())))
	print(main(nums))
init()


X = dict()
Y = dict()
A = set()
for i in range(8):
	(x, y) = list(map(int, input().split()))
	if (x, y) in A:
		print('ugly')
		return
	else:
		A.add((x, y))
	if x in X:
		X[x] += 1
	else:
		X[x] = 1
	if y in Y:
		Y[y] += 1
	else:
		Y[y] = 1
X = [(i, X[i]) for i in X]
Y = [(i, Y[i]) for i in Y]
X.sort()
Y.sort()
if len(X) == 3 and len(Y) == 3 and (X[0][1] == 3) and (X[1][1] == 2) and (X[2][1] == 3) and (Y[0][1] == 3) and (Y[1][1] == 2) and (Y[2][1] == 3):
	print('respectable')
else:
	print('ugly')


xx = set()
yy = set()
l = set()
for i in range(8):
	a = list(map(int, input().split()))
	(x, y) = (a[0], a[1])
	l.add((x, y))
	xx.add(x)
	yy.add(y)
ok = 1
if len(xx) != 3 or len(yy) != 3 or len(l) != 8:
	ok = 0
else:
	ax = list(xx)
	ay = list(yy)
	ax.sort()
	ay.sort()
	if (ax[1], ay[1]) in l:
		ok = 0
if ok == 1:
	print('respectable')
else:
	print('ugly')


class Point:

	def __init__(self, x=0, y=0):
		self.x = x
		self.y = y
points = []
xs = []
ys = []
is_exist = False
for _ in range(8):
	(x, y) = map(int, input().split())
	xs.append(x)
	ys.append(y)
	for point in points:
		if point.x == x and point.y == y:
			is_exist = True
	if is_exist:
		is_exist = False
	else:
		new_point = Point(x, y)
		points.append(new_point)
if len(set(xs)) < 3 or len(set(ys)) < 3:
	print('ugly')
else:
	min_x = min(xs)
	min_y = min(ys)
	max_x = max(xs)
	max_y = max(ys)
	count_min_x = count_min_y = count_max_x = count_max_y = 0
	for point in points:
		if point.x == min_x:
			count_min_x += 1
		if point.x == max_x:
			count_max_x += 1
		if point.y == min_y:
			count_min_y += 1
		if point.y == max_y:
			count_max_y += 1
	points.sort(key=lambda p: (p.x, p.y))
	if count_max_y == 3 and count_min_y == 3 and (count_max_x == 3) and (count_min_x == 3) and (points[1].y == points[6].y) and (points[3].x == points[4].x):
		print('respectable')
	else:
		print('ugly')


x = []
y = []
p = []
for i in range(8):
	(a, b) = [int(x) for x in input().split()]
	x.append(a)
	y.append(b)
	l = [a, b]
	p.append(l)
sx = list(set(x))
sy = list(set(y))
jud = 0
if len(sx) != 3 or len(sy) != 3:
	print('ugly')
	jud = 1
if jud == 0:
	sx.sort()
	sy.sort()
	pp = []
	for i in range(3):
		for j in range(3):
			li = [sx[i], sy[j]]
			pp.append(li)
	pp.remove([sx[1], sy[1]])
	p.sort()
	pp.sort()
	if p == pp:
		print('respectable')
	else:
		print('ugly')


arr = [[int(c) for c in input().split()] for i in range(8)]
xs = sorted(set([p[0] for p in arr]))
ys = sorted(set([p[1] for p in arr]))
if len(xs) != 3 or len(ys) != 3:
	print('ugly')
	exit()
for x in range(3):
	for y in range(3):
		if x == y == 1:
			continue
		if [xs[x], ys[y]] not in arr:
			print('ugly')
			exit()
print('respectable')


u = set()
v = set()
w = set()
s = set()

def work():
	nonlocal u, v
	if len(u) < 3 or len(v) < 3:
		return 0
	u = sorted(list(u))
	v = sorted(list(v))
	for i in range(3):
		for j in range(3):
			if i != 1 or j != 1:
				w.add((u[i], v[j]))
	return w == s
for i in range(8):
	(x, y) = list(map(int, input().split()))
	s.add((x, y))
	u.add(x)
	v.add(y)
if work():
	print('respectable')
else:
	print('ugly')


t = [tuple(map(int, input().split())) for i in range(8)]
t.sort()
s = t[0][0] < t[3][0] < t[5][0] and t[0][1] < t[1][1] < t[2][1] and (t[0][0] == t[1][0] == t[2][0]) and (t[3][0] == t[4][0]) and (t[5][0] == t[6][0] == t[7][0]) and (t[0][1] == t[3][1] == t[5][1]) and (t[1][1] == t[6][1]) and (t[2][1] == t[4][1] == t[7][1])
print(['ugly', 'respectable'][s])


def f(p):
	if len(set(p)) < 8:
		return False
	(x, y) = (sorted({pi[0] for pi in p}), sorted({pi[1] for pi in p}))
	return len(x) == 3 and len(y) == 3 and ((x[1], y[1]) not in p)
print('respectable' if f([tuple(map(int, input().split())) for i in range(8)]) else 'ugly')


lines = [tuple(map(int, input().split())) for i in range(8)]
x_set = set()
y_set = set()
for (x, y) in lines:
	x_set.add(x)
	y_set.add(y)
if len(x_set) == len(y_set) == 3:
	flag = False
	(x_sort, y_sort) = (sorted(x_set), sorted(y_set))
	for x in x_sort:
		for y in y_sort:
			if (x, y) != (x_sort[1], y_sort[1]) and (x, y) not in lines:
				flag = True
else:
	flag = True
print('ugly' if flag else 'respectable')


class intersection:

	def __init__(self, x, y):
		self.x = x
		self.y = y

	def __lt__(self, other):
		if self.x < other.x or (self.x == other.x and self.y < other.y):
			return True
		else:
			return False
a = []
x = []
y = []
for i in range(8):
	(m, n) = list(map(int, input().split()))
	x.append(m)
	y.append(n)
	a.append(intersection(m, n))
a.sort()

def cnt_dif(a):
	tempt = a[:]
	tempt.sort()
	dif = [tempt[0]]
	for i in range(1, 8):
		if tempt[i] != tempt[i - 1]:
			dif.append(tempt[i])
	return dif
b = []
res_x = cnt_dif(x)
res_y = cnt_dif(y)
flag = True
if len(res_x) == 3 and len(res_y) == 3:
	for i in range(3):
		for j in range(3):
			if i == 1 and j == 1:
				continue
			else:
				b.append(intersection(res_x[i], res_y[j]))
if len(b) != 8:
	flag = False
else:
	for i in range(8):
		if a[i].x != b[i].x or a[i].y != b[i].y:
			flag = False
			break
if flag:
	print('respectable')
else:
	print('ugly')


x = []
y = []

def unique(a):
	res = []
	res.append(a[0])
	for i in range(1, len(a)):
		if a[i] != a[i - 1]:
			res.append(a[i])
	return res

def process(x, y, a, b, n):
	if len(x) != 3 or len(y) != 3:
		return 'ugly'
	check1 = False
	check2 = False
	for i in range(3):
		for j in range(3):
			flag = 'ugly'
			if i != 1 or j != 1:
				for k in range(n):
					if a[k] == x[i] and b[k] == y[j]:
						flag = 'respectable'
				if flag == 'ugly':
					return flag
	return 'respectable'
for i in range(8):
	(a, b) = map(int, input().split())
	x.append(a)
	y.append(b)
a = x[:]
b = y[:]
x.sort()
y.sort()
x = unique(x)
y = unique(y)
print(process(x, y, a, b, 8))


class point:

	def __init__(self, x=0, y=0):
		self.x = x
		self.y = y
x = []
y = []
a = []
for i in range(8):
	(u, v) = map(int, input().split())
	a.append(point(u, v))
	if u not in x:
		x.append(u)
	if v not in y:
		y.append(v)
if len(x) != 3 or len(y) != 3:
	print('ugly')
	exit()
x.sort()
y.sort()
a.sort(key=lambda p: (p.x, p.y))
k = 0
flag = True
for i in range(3):
	for j in range(3):
		if i == 1 and j == 1:
			continue
		if a[k].x != x[i] or a[k].y != y[j]:
			flag = False
		k += 1
if flag:
	print('respectable')
else:
	print('ugly')


a = []
b = []
c = []
for i in range(8):
	(x, y) = map(int, input().split())
	a.append(x)
	b.append(y)
	c.append([x, y])
unique_c = [c[0]]
set_a = list(set(a))
set_b = list(set(b))
set_a.sort()
set_b.sort()
result = 'respectable'
for i in range(1, len(c)):
	if c[i] not in unique_c:
		unique_c.append(c[i])
if len(unique_c) != len(c):
	result = 'ugly'
elif len(set_a) != 3 or len(set_b) != 3:
	result = 'ugly'
elif [set_a[1], set_b[1]] in c:
	result = 'ugly'
print(result)


def Slove():
	A = sorted((tuple(map(int, input().split())) for _ in range(8)))
	if A[0][0] == A[1][0] == A[2][0] < A[3][0] == A[4][0] < A[5][0] == A[6][0] == A[7][0] and A[0][1] == A[3][1] == A[5][1] < A[1][1] == A[6][1] < A[2][1] == A[4][1] == A[7][1]:
		print('respectable')
	else:
		print('ugly')
Slove()


v = []
for i in range(0, 8):
	(x, y) = map(int, input().split())
	v.append((x, y))
v.sort()
if v[0][0] == v[1][0] == v[2][0] and v[3][0] == v[4][0] and (v[5][0] == v[6][0] == v[7][0]) and (v[0][1] == v[3][1] == v[5][1]) and (v[1][1] == v[6][1]) and (v[2][1] == v[4][1] == v[7][1]) and (v[0][0] != v[3][0] != v[7][0]) and (v[0][1] != v[1][1] != v[2][1]):
	print('respectable')
else:
	print('ugly')


x_set = set()
y_set = set()
points = []
for i in range(8):
	(x, y) = [int(k) for k in input().split()]
	x_set.add(x)
	y_set.add(y)
	points.append((x, y))
cnt = 0
if len(x_set) != 3 or len(y_set) != 3:
	print('ugly')
else:
	x_set = sorted(x_set)
	y_set = sorted(y_set)
	for i in range(3):
		for j in range(3):
			for k in range(8):
				if points[k][0] == x_set[i] and points[k][1] == y_set[j]:
					if i == 1 and j == 1:
						break
					cnt += 1
					break
	if cnt == 8:
		print('respectable')
	else:
		print('ugly')


class point:

	def __init__(self, x, y):
		self.x = x
		self.y = y

	def __lt__(self, other):
		return self.x < other.x or (self.x == other.x and self.y < other.y)
p = []
for i in range(8):
	(x, y) = map(int, input().split())
	p.append(point(x, y))
p.sort()
if p[0].x == p[1].x and p[1].x == p[2].x and (p[2].x != p[3].x) and (p[3].x == p[4].x) and (p[4].x != p[5].x) and (p[5].x == p[6].x) and (p[6].x == p[7].x) and (p[0].y == p[3].y) and (p[3].y == p[5].y) and (p[5].y != p[1].y) and (p[1].y == p[6].y) and (p[6].y != p[2].y) and (p[2].y == p[4].y) and (p[4].y == p[7].y):
	print('respectable')
else:
	print('ugly')


lis = []
for i in range(8):
	(a, b) = map(int, input().split())
	s = (a, b)
	if s in lis:
		print('ugly')
		exit()
	lis.append(s)
lis = sorted(lis)
arr = [[], [], []]
for i in range(8):
	p = lis[i]
	if i < 3:
		arr[0].append(p)
	elif i < 5:
		arr[1].append(p)
	else:
		arr[2].append(p)
if arr[0][0][0] == arr[0][1][0] == arr[0][2][0] and arr[0][0][1] == arr[1][0][1] and (arr[0][2][1] == arr[1][1][1]) and (arr[0][0][1] == arr[2][0][1]) and (arr[0][1][1] == arr[2][1][1]) and (arr[0][2][1] == arr[2][2][1]) and (arr[0][0][0] < arr[1][0][0] < arr[2][0][0]):
	print('respectable')
else:
	print('ugly')


ar = [tuple(map(int, input().split(' '))) for i in range(8)]
ar.sort()
print('respectable' if ar[0][0] == ar[1][0] == ar[2][0] and ar[3][0] == ar[4][0] and (ar[5][0] == ar[6][0] == ar[7][0]) and (ar[0][1] == ar[3][1] == ar[5][1]) and (ar[1][1] == ar[6][1]) and (ar[2][1] == ar[4][1] == ar[7][1]) and (ar[0][0] < ar[3][0] < ar[5][0]) and (ar[0][1] < ar[1][1] < ar[2][1]) else 'ugly')


from collections import namedtuple
Point = namedtuple('Point', ['x', 'y'])
answers = ['respectable', 'ugly']
ps = []
for _ in range(8):
	(x, y) = input().split(' ')
	ps.append(Point(int(x), int(y)))
ps.sort()

def parallelline(lA, lB):
	(pAA, pAB, pAC) = lA
	(pBA, pBB, pBC) = lB
	if pAA.x == pAB.x and pAA.x == pAC.x:
		if pBA.x == pBB.x and pBA.x == pBC.x:
			if pAA.y == pBA.y and pAB.y == pBB.y and (pAC.y == pBC.y):
				if pAA.y != pAB.y and pAA.y != pAC.y:
					return True
	if pAA.y == pAB.y and pAA.y == pAC.y:
		if pBA.y == pBB.y and pBA.y == pBC.y:
			if pAA.x == pBA.x and pAB.x == pBB.x and (pAC.x == pBC.x):
				if pAA.x != pAB.x and pAA.x != pAC.x:
					return True
	return False
if parallelline((ps[0], ps[1], ps[2]), (ps[5], ps[6], ps[7])) and parallelline((ps[0], ps[3], ps[5]), (ps[2], ps[4], ps[7])):
	print(answers[0])
else:
	print(answers[1])


n = 8
group = 3
middle = 1
dx = {}
dy = {}
pairs = set()
isUgly = False
for i in range(n):
	(x, y) = map(int, input().split())
	if x in dx:
		dx[x] += 1
		if dx[x] > group:
			isUgly = True
	else:
		dx[x] = 1
	if y in dy:
		dy[y] += 1
		if dy[y] > group:
			isUgly = True
	else:
		dy[y] = 1
	pair = str(x) + str(y)
	pairs.add(pair)
if len(dx) == group and len(dy) == group and (len(pairs) == n) and (not isUgly):
	arrX = list(dx.keys())
	arrX.sort()
	arrY = list(dy.keys())
	arrY.sort()
	x2 = arrX[middle]
	y2 = arrY[middle]
	pair = str(x2) + str(y2)
	for e in pairs:
		if e == pair:
			isUgly = True
			break
	if isUgly:
		print('ugly')
	else:
		print('respectable')
else:
	print('ugly')


from collections import *
points = sorted(([int(x) for x in input().split()] for i in range(8)))
(x, y) = (Counter(), Counter())
for (r, c) in points:
	x[r] += 1
	y[c] += 1
xk = sorted(x.keys())
yk = sorted(y.keys())
test = []
for r in xk:
	for c in yk:
		test.append([r, c])
del test[len(test) // 2]
if test == points:
	print('respectable')
else:
	print('ugly')


import sys
fin = sys.stdin
points = []
for i in range(8):
	(x, y) = map(int, fin.readline().split())
	points += [(x, y)]

def CheckPoints(p):
	if not p[0][0] == p[1][0] == p[2][0]:
		return False
	x1 = p[0][0]
	if not p[3][0] == p[4][0]:
		return False
	x2 = p[3][0]
	if not p[5][0] == p[6][0] == p[7][0]:
		return False
	x3 = p[5][0]
	if not p[0][1] == p[3][1] == p[5][1]:
		return False
	y1 = p[0][1]
	if not p[1][1] == p[6][1]:
		return False
	y2 = p[1][1]
	if not p[2][1] == p[4][1] == p[7][1]:
		return False
	y3 = p[2][1]
	return x1 < x2 < x3 and y1 < y2 < y3
from itertools import *
for p in permutations(points):
	if CheckPoints(p):
		print('respectable')
		break
else:
	print('ugly')


lists = []
dicts = {}
sets = set()
for i in range(8):
	lists.append(tuple(input().split()))
for x in lists:
	sets.add(x)
if len(sets) == 8:
	for x in range(8):
		count = dicts.get(int(lists[x][0]), 0)
		dicts[int(lists[x][0])] = count + 1
	if len(dicts.keys()) == 3:
		temp = sorted(dicts.items())
		if temp[0][1] == 3 and temp[1][1] == 2 and (temp[2][1] == 3):
			dicts.clear()
			for x in range(8):
				count = dicts.get(int(lists[x][1]), 0)
				dicts[int(lists[x][1])] = count + 1
			if len(dicts.keys()) == 3:
				temp = sorted(dicts.items())
				if temp[0][1] == 3 and temp[1][1] == 2 and (temp[2][1] == 3):
					print('respectable')
				else:
					print('ugly')
			else:
				print('ugly')
		else:
			print('ugly')
	else:
		print('ugly')
else:
	print('ugly')


((a, b), (c, d), (e, f), (g, h), (i, j), (k, l), (m, n), (o, p)) = sorted((tuple(map(int, input().split())) for _ in range(8)))
print(('ugly', 'respectable')[a == c == e < g == i < k == m == o and b == h == l < d == n < f == j == p])


def check_condition(axis):
	for i in range(1, 3):
		if points[i - 1][axis] != points[i][axis]:
			return False
	if points[2][axis] == points[3][axis]:
		return False
	if points[3][axis] != points[4][axis] or points[4][axis] == points[5][axis]:
		return False
	for i in range(6, 8):
		if points[i - 1][axis] != points[i][axis]:
			return False
	return True

def main():
	global points
	points = list()
	for _ in range(8):
		point = tuple(map(int, input().split()))
		points.append(point)
	for i in range(8):
		if points.count(points[i]) > 1:
			print('ugly')
			exit(0)
	points.sort(key=lambda point: point[0])
	check_x = check_condition(0)
	points.sort(key=lambda point: point[1])
	check_y = check_condition(1)
	if check_x and check_y:
		print('respectable')
	else:
		print('ugly')
main()


points_set = []
for i in range(8):
	points_set.append([int(i) for i in input().split()])
x_list = []
y_list = []
x_count = 0
y_count = 0
points_set.sort(key=lambda x: (x[0], x[1]))
for i in points_set:
	if i[0] not in x_list:
		x_list.append(i[0])
		x_count += 1
	if i[1] not in y_list:
		y_list.append(i[1])
		y_count += 1
if x_count != 3 or y_count != 3:
	print('ugly')
	exit()
for i in range(3):
	if [x_list[0], y_list[i]] not in points_set or [x_list[2], y_list[i]] not in points_set:
		print('ugly')
		exit()
if [x_list[1], y_list[0]] not in points_set or [x_list[1], y_list[2]] not in points_set:
	print('ugly')
	exit()
print('respectable')


class CodeforcesTask334BSolution:

	def __init__(self):
		self.result = ''
		self.points = []

	def read_input(self):
		for x in range(8):
			self.points.append([int(x) for x in input().split(' ')])

	def process_task(self):
		xs = [x[0] for x in self.points]
		xs.sort()
		ys = [x[1] for x in self.points]
		ys.sort()
		if xs[0] == xs[1] == xs[2] < xs[3] == xs[4] < xs[5] == xs[6] == xs[7] and ys[0] == ys[1] == ys[2] < ys[3] == ys[4] < ys[5] == ys[6] == ys[7] and (not sum([1 if self.points.count(x) > 1 else 0 for x in self.points])):
			self.result = 'respectable'
		else:
			self.result = 'ugly'

	def get_result(self):
		return self.result
Solution = CodeforcesTask334BSolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


d = [{}, {}]
t = []
for i in range(8):
	(x, y) = [int(x) for x in input().split()]
	if [x, y] in t:
		print('ugly')
		exit()
	t.append([x, y])
	if x not in d[0]:
		d[0][x] = 1
	else:
		d[0][x] += 1
	if y not in d[1]:
		d[1][y] = 1
	else:
		d[1][y] += 1
if len(d[0]) == 3 and len(d[1]) == 3:
	(a, b) = ([], [])
	for k in sorted(d[0]):
		a.append(d[0][k])
	for k in sorted(d[1]):
		b.append(d[1][k])
	if a == [3, 2, 3] and b == [3, 2, 3]:
		print('respectable')
	else:
		print('ugly')
else:
	print('ugly')


x = []
y = []
for _ in range(8):
	point = input().split()
	x.append(int(point[0]))
	y.append(int(point[1]))
unique = []
for i in range(8):
	if (x[i], y[i]) in unique:
		print('ugly')
		quit()
	else:
		unique.append((x[i], y[i]))
x.sort()
if x[0] == x[1] == x[2] and x[2] != x[3] and (x[3] == x[4]) and (x[4] != x[5]) and (x[5] == x[6] == x[7]):
	y.sort()
	if y[0] == y[1] == y[2] and y[2] != y[3] and (y[3] == y[4]) and (y[4] != y[5]) and (y[5] == y[6] == y[7]):
		print('respectable')
		quit()
	else:
		print('ugly')
		quit()
print('ugly')


lines = []
for i in range(0, 8):
	lines.append(list(map(int, input().split())))
lines = sorted(lines)
countA = [lines[0][0]]
countB = [lines[0][1]]
for i in range(1, len(lines)):
	if lines[i][0] != lines[i - 1][0]:
		countA.append(lines[i][0])
	if lines[i][1] not in countB:
		countB.append(lines[i][1])
if len(countA) != 3 or len(countB) != 3:
	print('ugly')
else:
	index = 0
	check = True
	for i in countA:
		for j in countB:
			if i == countA[1] and j == countB[1]:
				continue
			if i != lines[index][0] or j != lines[index][1]:
				check = False
				break
			index += 1
	if check:
		print('respectable')
	else:
		print('ugly')


import sys
pair = []
xs = []
ys = []
for i in range(8):
	(x, y) = map(int, input().split())
	pair.append((x, y))
	if x not in xs:
		xs.append(x)
	if y not in ys:
		ys.append(y)
if len(xs) != 3 or len(ys) != 3:
	print('ugly')
else:
	xs.sort()
	ys.sort()
	for i in range(len(xs)):
		for j in range(len(ys)):
			if i == 1 and j == 1:
				if (xs[i], ys[i]) in pair:
					print('ugly')
					sys.exit()
			elif (xs[i], ys[j]) not in pair:
				print('ugly')
				sys.exit()
	print('respectable')


pairs = []
for i in range(8):
	tmp = list(map(int, input().split()))
	pairs.append(tmp)
pairs.sort()

def judge():
	return pairs[0][0] < pairs[3][0] < pairs[5][0] and pairs[0][1] < pairs[1][1] < pairs[2][1] and (pairs[0][0] == pairs[1][0] == pairs[2][0]) and (pairs[3][0] == pairs[4][0]) and (pairs[5][0] == pairs[6][0] == pairs[7][0]) and (pairs[0][1] == pairs[5][1]) and (pairs[1][1] == pairs[6][1]) and (pairs[2][1] == pairs[7][1]) and (pairs[0][1] == pairs[3][1]) and (pairs[2][1] == pairs[4][1])
if judge():
	print('respectable')
else:
	print('ugly')


import operator
mylist = []
for i in range(0, 8):
	mylist.append(list(map(int, input().split())))
mylist.sort(key=lambda sublist: sublist[1])
mylist.sort(key=lambda sublist: sublist[0])
if mylist[0][0] == mylist[1][0] == mylist[2][0] and mylist[3][0] == mylist[4][0] and (mylist[5][0] == mylist[6][0] == mylist[7][0]) and (mylist[0][1] == mylist[3][1] == mylist[5][1]) and (mylist[2][1] == mylist[4][1] == mylist[7][1]) and (mylist[1][1] == mylist[6][1]) and (mylist[0][0] < mylist[3][0] < mylist[5][0]) and (mylist[0][1] < mylist[1][1] < mylist[2][1] or mylist[0][1] > mylist[1][1] > mylist[2][1]):
	print('respectable')
else:
	print('ugly')


def eight_point_sets_2(s):
	x = list(set([a[0] for a in s]))
	x.sort()
	y = list(set([b[1] for b in s]))
	y.sort()
	test = True
	if len(x) != 3 or len(y) != 3:
		test = False
		return test
	for i in range(0, 3):
		for j in range(0, 3):
			if i != 1 or j != 1:
				if [x[i], y[j]] not in s:
					test = False
					break
	return test
l = []
for i in range(8):
	this_point = [int(x) for x in input().split()]
	l.append(this_point)
result = eight_point_sets_2(l)
if result == True:
	print('respectable')
else:
	print('ugly')


Q = sorted
S = set
I = S()
X = S()
Y = S()
T = S()
for _ in '0' * 8:
	(x, y) = map(int, input().split())
	I.add((x, y))
	X.add(x)
	Y.add(y)
X = Q(X)
Y = Q(Y)
print(['ugly', 'respectable'][len(X) == len(Y) == 3 and set([(x, y) for x in X for y in Y if x != X[1] or y != Y[1]]) == I])


class coor:

	def __init__(self, x, y):
		self.x = x
		self.y = y

	def __lt__(self, other):
		if self.x < other.x:
			return True
		elif self.x > other.x:
			return False
		elif self.y < other.y:
			return True
		else:
			return False
a = []
first = set()
second = set()
for i in range(0, 8):
	(x, y) = map(int, input().split())
	first.add(x)
	second.add(y)
	a.append(coor(x, y))
a.sort()
ok = False
if a[0].x == a[1].x and a[0].x == a[2].x:
	if a[0].y != a[1].y and a[1].y != a[2].y:
		if a[3].x == a[4].x and a[3].y != a[1].y and (a[4].y != a[1].y):
			if a[5].x == a[6].x and a[6].x == a[7].x:
				if a[5].y != a[6].y and a[6].y != a[7].y:
					ok = 1
if ok == True and len(first) == 3 and (len(second) == 3):
	print('respectable')
else:
	print('ugly')


x = [0] * 8
y = [0] * 8
z = []
for i in range(8):
	(x[i], y[i]) = map(int, input().split())
	if (x[i], y[i]) not in z:
		z.append((x[i], y[i]))
sx = set(x)
sy = set(y)
if len(sx) != 3 or len(sy) != 3 or len(z) != 8:
	print('ugly')
else:
	xx = sorted(list(sx))
	yy = sorted(list(sy))
	if (xx[1], yy[1]) in z:
		print('ugly')
	else:
		print('respectable')


n = 8
p = []
xs = []
ys = []
for i in range(n):
	(x, y) = map(int, input().split())
	p.append((x, y))
	xs.append(x)
	ys.append(y)
xs = list(sorted(list(set(xs))))
ys = list(sorted(list(set(ys))))
p.sort()
if len(xs) != 3 or len(ys) != 3:
	print('ugly')
elif p == [(xs[0], ys[0]), (xs[0], ys[1]), (xs[0], ys[2]), (xs[1], ys[0]), (xs[1], ys[2]), (xs[2], ys[0]), (xs[2], ys[1]), (xs[2], ys[2])]:
	print('respectable')
else:
	print('ugly')


x = []
y = []
arr = []
for i in range(8):
	(xi, yi) = map(int, input().split())
	arr.append((xi, yi))
	if xi not in x:
		x.append(xi)
	if yi not in y:
		y.append(yi)
if len(x) == 3 and len(y) == 3:
	x = sorted(x)
	y = sorted(y)
	ugly = False
	for i in range(3):
		for j in range(3):
			if not (i == 1 and j == 1) and (x[i], y[j]) not in arr:
				ugly = True
	if ugly == True:
		print('ugly')
	else:
		print('respectable')
else:
	print('ugly')


l = [[int(c) for c in input().split()] for i in range(8)]
xs = sorted(set([p[0] for p in l]))
ys = sorted(set([p[1] for p in l]))
if len(xs) != 3 or len(ys) != 3:
	print('ugly')
else:
	done = False
	for x in range(3):
		for y in range(3):
			if x == y == 1:
				continue
			if [xs[x], ys[y]] not in l:
				print('ugly')
				done = True
				break
		if done:
			break
	if not done:
		print('respectable')


a = [0] * 8
b = [0] * 8
c = [0] * 8
d = [0] * 8
flag = 0
for i in range(8):
	(x, y) = map(int, input().split())
	a[i] = x
	b[i] = y
	c[i] = x
	d[i] = y
n = 8
a.sort(reverse=False)
b.sort(reverse=False)
x1 = a[0]
x2 = a[3]
x3 = a[7]
y1 = b[0]
y2 = b[3]
y3 = b[7]
flag = 0
if x1 == x2 or x1 == x3 or x2 == x3 or (y1 == y2) or (y1 == y3) or (y2 == y3):
	flag = -1
for i in range(n):
	if c[i] == x2 and d[i] == y2:
		flag = -1
		break
	for j in range(i + 1, n - 1):
		if c[i] == c[j] and d[i] == d[j]:
			flag = -1
			break
if not (a[0] == a[1] == a[2] and a[3] == a[4] and (a[5] == a[6] == a[7])):
	flag = -1
if not (b[0] == b[1] == b[2] and b[3] == b[4] and (b[5] == b[6] == b[7])):
	flag = -1
if flag == 0:
	print('respectable')
else:
	print('ugly')


def solve():
	S = set()
	x = [-1] * 3
	y = [-1] * 3
	xc = [0] * 3
	yc = [0] * 3
	i = 0
	for i in range(8):
		(xi, yi) = list(map(int, input().split()))
		if str([xi, yi]) in S:
			return 0
		S.add(str([xi, yi]))
		j = 0
		while j < 3:
			if x[j] == -1:
				x[j] = xi
				xc[j] += 1
				break
			elif x[j] == xi:
				xc[j] += 1
				break
			j += 1
		if j == 3:
			return 0
		j = 0
		while j < 3:
			if y[j] == -1:
				y[j] = yi
				yc[j] += 1
				break
			elif y[j] == yi:
				yc[j] += 1
				break
			j += 1
		if j == 3:
			return 0
	i = 0
	while i < 3:
		if xc[i] == 2:
			(x[i], x[1]) = (x[1], x[i])
			(xc[i], xc[1]) = (xc[1], xc[i])
			break
		i += 1
	if i == 3:
		return 0
	if xc[0] != 3 or xc[2] != 3:
		return 0
	if x[0] > x[2]:
		(x[0], x[2]) = (x[2], x[0])
	if x[0] > x[1] or x[1] > x[2]:
		return 0
	i = 0
	while i < 3:
		if yc[i] == 2:
			(y[i], y[1]) = (y[1], y[i])
			(yc[i], yc[1]) = (yc[1], yc[i])
			break
		i += 1
	if i == 3:
		return 0
	if yc[0] != 3 or yc[2] != 3:
		return 0
	if y[0] > y[2]:
		(y[0], y[2]) = (y[2], y[0])
	if y[0] > y[1] or y[1] > y[2]:
		return 0
	return 1
if solve() == 1:
	print('respectable')
else:
	print('ugly')


from sys import stdin, stdout
nmbr = lambda : int(stdin.readline())
lst = lambda : list(map(int, stdin.readline().split()))
for _ in range(1):
	mp = {}
	sx = set()
	sy = set()
	f = 1
	for i in range(8):
		(a, b) = lst()
		sx.add(a)
		sy.add(b)
		mp[a, b] = 1
	if len(sx) != 3 or len(sy) != 3:
		print('ugly')
		continue
	(a, b, c) = sorted(sx)
	(a1, b1, c1) = sorted(sy)
	for i in [a, b, c]:
		for j in [a1, b1, c1]:
			if i == b and j == b1:
				continue
			if (i, j) not in mp:
				f = 0
				break
	print('respectable' if f else 'ugly')


def check(x):
	iks = []
	ygrek = []
	for i in x:
		if i[0] not in iks:
			iks.append(i[0])
		if i[1] not in ygrek:
			ygrek.append(i[1])
	if len(iks) != 3 or len(ygrek) != 3:
		return False
	iks.sort()
	ygrek.sort()
	for i in range(8):
		if x[i] == (iks[1], ygrek[1]):
			return False
	if len(set(x)) == 8:
		return True
	return False
x = []
for i in range(8):
	s = input().split(' ')
	x.append((int(s[0]), int(s[1])))
if check(x):
	print('respectable')
else:
	print('ugly')


def components(lst, a, b):
	if len(a) != 3 or len(b) != 3:
		return 'ugly'
	for x in range(3):
		for y in range(3):
			if x == y == 1:
				continue
			if [a[x], b[y]] not in lst:
				return 'ugly'
	return 'respectable'
arr = [[int(c) for c in input().split()] for i in range(8)]
lst1 = sorted(set([p[0] for p in arr]))
lst2 = sorted(set([p[1] for p in arr]))
print(components(arr, lst1, lst2))


from sys import stderr
a = [tuple(map(int, input().split())) for i in range(8)]
x = sorted(list(set([i[0] for i in a])))
y = sorted(list(set([i[1] for i in a])))
print(a, file=stderr)
print(x, y, file=stderr)
if len(x) != 3 or len(y) != 3:
	print('ugly')
else:
	ans = 'respectable'
	for i in x:
		for j in y:
			if (i != x[1] or j != y[1]) and (i, j) not in a:
				ans = 'ugly'
	if (x[1], y[1]) in a:
		ans = 'ugly'
	print(ans)


x = []
y = []
all = []
for i in range(8):
	(xx, yy) = map(int, input().split())
	x.append(xx)
	y.append(yy)
	all.append((xx, yy))
sx = set(x)
sy = set(y)
if len(sx) % 3 != 0 or len(sy) % 3 != 0:
	print('ugly')
else:
	sx = sorted(list(sx))
	sy = sorted(list(sy))
	for i in range(3):
		for j in range(3):
			if i == 1 and j == 1:
				continue
			if not (sx[i], sy[j]) in all:
				print('ugly')
				exit()
	print('respectable')


class Point:

	def __init__(self, x=0, y=0):
		self.x = x
		self.y = y
arr_point = []
for i in range(8):
	(tmp_x, tmp_y) = map(int, input().split())
	arr_point.append(Point(tmp_x, tmp_y))
for i in range(8):
	for j in range(i + 1, 8):
		if arr_point[i].x == arr_point[j].x and arr_point[i].y == arr_point[j].y:
			print('ugly')
			exit()
distinctX = []
distinctX.append(arr_point[0].x)
distinctY = []
distinctY.append(arr_point[0].y)
for i in range(1, 8):
	check_x = check_y = False
	for j in range(len(distinctX)):
		if arr_point[i].x == distinctX[j]:
			check_x = True
			break
	for j in range(len(distinctY)):
		if arr_point[i].y == distinctY[j]:
			check_y = True
			break
	if check_x == False:
		distinctX.append(arr_point[i].x)
	if check_y == False:
		distinctY.append(arr_point[i].y)
if len(distinctX) != 3 or len(distinctY) != 3:
	print('ugly')
	exit()
distinctX.sort()
distinctY.sort()
cnt_point = 0
for k in range(8):
	for i in range(len(distinctX)):
		for j in range(len(distinctY)):
			if arr_point[k].x == distinctX[i] and arr_point[k].y == distinctY[j]:
				if i != 1 or j != 1:
					cnt_point += 1
				break
if cnt_point == 8:
	print('respectable')
else:
	print('ugly')


x = [None] * 10
y = [None] * 10
t = []
xc = []
yc = []
f = False
for i in range(8):
	(x[i], y[i]) = list(map(int, input().split()))
	if (x[i], y[i]) in t:
		f = True
	t.append((x[i], y[i]))
	if not x[i] in xc:
		xc.append(x[i])
	if y[i] not in yc:
		yc.append(y[i])
if len(xc) != 3 or len(yc) != 3 or f:
	print('ugly')
else:
	yc.sort()
	xc.sort()
	if (xc[1], yc[1]) in t:
		print('ugly')
	else:
		print('respectable')


(x, y) = ([0] * 8, [0] * 8)
for i in range(8):
	(x[i], y[i]) = map(int, input().split())
for i in range(8):
	for j in range(i):
		if x[i] == x[j] and y[i] == y[j]:
			print('ugly')
			break
	else:
		continue
	break
else:
	x.sort()
	y.sort()
	if x[0] == x[1] == x[2] and x[3] == x[4] and (x[5] == x[6] == x[7]) and (y[0] == y[1] == y[2]) and (y[3] == y[4]) and (y[5] == y[6] == y[7]) and (x[2] != x[3]) and (x[4] != x[5]) and (y[2] != x[3]) and (y[4] != x[5]):
		print('respectable')
	else:
		print('ugly')


x = []
y = []
for i in range(8):
	(xi, yi) = map(int, input().split())
	x.append(xi)
	y.append(yi)
xtmp = sorted(x)
ytmp = sorted(y)
xdist_list = [xtmp[0]]
ydist_list = [ytmp[0]]
for i in range(1, 8):
	if xtmp[i] != xtmp[i - 1]:
		xdist_list.append(xtmp[i])
	if ytmp[i] != ytmp[i - 1]:
		ydist_list.append(ytmp[i])
if len(xdist_list) != 3 or len(ydist_list) != 3:
	print('ugly')
	exit()
full_eight_points_set = []
for i in range(3):
	for j in range(3):
		if i != 1 or j != 1:
			found = False
			for k in range(8):
				if x[k] == xdist_list[i] and y[k] == ydist_list[j]:
					found = True
					break
			if not found:
				print('ugly')
				exit()
print('respectable')


import os
import sys
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz/'
M = 998244353
EPS = 1e-06

def Ceil(a, b):
	return a // b + int(a % b > 0)

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
x = set()
y = set()
have = []
for _ in range(8):
	(i, j) = value()
	have.append((i, j))
	x.add(i)
	y.add(j)
ans = 'respectable'
if len(x) != 3 or len(y) != 3:
	ans = 'ugly'
else:
	no = []
	x = sorted(x)
	y = sorted(y)
	for i in x:
		for j in y:
			if (i, j) not in have:
				no.append((i, j))
	if len(no) == 1 and no[0] != (x[1], y[1]):
		ans = 'ugly'
	elif len(no) > 1:
		ans = 'ugly'
print(ans)


import sys
import math
sys.setrecursionlimit(100000)

class Pair:

	def __init__(self, x, y):
		self.first = x
		self.second = y

	def __lt__(self, other):
		return self.first < other.first or (self.first == other.first and self.second < other.second)

	def __eq__(self, other):
		return self.first == other.first and self.second == other.second
(lst, a, b) = ([], [], [])
for i in range(8):
	(x, y) = map(int, input().split())
	if x not in a:
		a.append(x)
	if y not in b:
		b.append(y)
	if Pair(x, y) not in lst:
		lst.append(Pair(x, y))
a.sort()
b.sort()
lst.sort()

def solve():
	if len(a) == 3 and len(b) == 3 and (len(lst) == 8):
		if Pair(a[1], b[1]) not in lst:
			return True
		return False
	return False
if solve():
	print('respectable')
else:
	print('ugly')


from collections import defaultdict
maps = defaultdict(int)
maps1 = defaultdict(int)
arr = []
distinct_count = distinct_count1 = 0
for i in range(8):
	temp = list(map(int, input().split()))
	if temp[0] not in maps:
		distinct_count += 1
	if temp[1] not in maps1:
		distinct_count1 += 1
	maps[temp[0]] = maps1[temp[1]] = 1
	arr.append(temp)
if distinct_count != 3 or distinct_count1 != 3:
	print('ugly')
	exit()
k = sorted(maps.keys())
k1 = sorted(maps1.keys())
for i in range(8):
	if arr[i] == [k[1], k1[1]]:
		print('ugly')
		exit()
for i in range(7):
	for j in range(i + 1, 8):
		if arr[j] == arr[i]:
			print('ugly')
			exit()
print('respectable')


class coor:

	def __init__(self, x, y):
		self.x = x
		self.y = y

	def __lt__(self, other):
		if self.x < other.x:
			return True
		elif self.x > other.x:
			return False
		elif self.y < other.y:
			return True
		else:
			return False

def init():
	point = []
	for i in range(8):
		num_input = input()
		num_input = num_input.split(' ')
		point.append(coor(int(num_input[0]), int(num_input[1])))
	return point

def solve(point):
	point.sort()
	if point[0].x == point[1].x == point[2].x and point[3].x == point[4].x and (point[5].x == point[6].x == point[7].x) and (point[0].y == point[3].y == point[5].y) and (point[1].y == point[6].y) and (point[2].y == point[4].y == point[7].y):
		if point[0].x < point[3].x < point[5].x and point[0].y < point[1].y < point[2].y:
			return 'respectable'
	return 'ugly'
print(solve(init()))