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 x1, x2, x3 and three more integers y1, y2, y3, such that x1 < x2 < x3, y1 < y2 < y3 and the eight point set consists of all points (xi, yj) (1 ≤ i, j ≤ 3), except for point (x2, y2).You have a set of eight points. Find out if Gerald can use this set?

The input consists of eight lines, the i-th line contains two space-separated integers xi and yi (0 ≤ xi, yi ≤ 106). You do not have any other conditions for these points.

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

using System;
using System.Collections.Generic;

namespace EightPointSets
{
    public class Point
    {
        public int x;
        public int y;
    }

    public class PointComparer : IComparer<Point>
    {
        public int Compare(Point p1, Point p2)
        {
            if (p1.x < p2.x)
            {
                return -1;
            }
            else if (p1.x == p2.x)
            {
                if (p1.y < p2.y)
                    return -1;
                else
                    return 1;
            }

            return 1;
        }
    }

    class EightPointSets
    {
        static void Main(string[] args)
        {
            string[] input;
            List<Point> point = new List<Point>();

            for (int i = 0; i < 8; i++)
            {
                input = Console.ReadLine().Split();
                point.Add(new Point() { x = int.Parse(input[0]), y = int.Parse(input[1]) });
            }

            point.Sort(new PointComparer());

            bool respectable = point[0].x == point[1].x && point[1].x == point[2].x &&
                               point[3].x == point[4].x &&
                               point[5].x == point[6].x && point[6].x == point[7].x &&
                               point[0].y == point[3].y && point[3].y == point[5].y &&
                               point[1].y == point[6].y &&
                               point[2].y == point[4].y && point[4].y == point[7].y &&
                               point[0].x < point[3].x && point[3].x < point[5].x &&
                               point[0].y < point[1].y && point[1].y < point[2].y;

            if (!respectable)
                Console.WriteLine("ugly");
            else
                Console.WriteLine("respectable");
        }

        private static bool Equals(Point p1, Point p2)
        {
            if (p1.x != p2.x || p1.y != p2.y)
                return false;
            else
                return true;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Web;
using System.Net;
using System.Collections;

namespace ConsoleApplication1 {
    class Program {
        static void Main( string[] args ) {
            List<int[]> points = new List<int[]>();
            for ( int i = 0; i < 8; i++ ) {
                points.Add(new int[] { ReadInt(), ReadInt() });
            }

            points.Sort(( p1, p2 ) => {
                if ( p1[ 1 ] != p2[ 1 ] )
                    return p1[ 1 ] < p2[ 1 ] ? -1 : 1;
                else return p1[ 0 ] < p2[ 0 ] ? -1 : 1;
            });

            bool f = points[ 0 ][ 0 ] < points[ 1 ][ 0 ] && points[ 0 ][ 1 ] == points[ 1 ][ 1 ] &&
                points[ 1 ][ 0 ] < points[ 2 ][ 0 ] && points[ 1 ][ 1 ] == points[ 2 ][ 1 ] &&
                points[ 3 ][ 0 ] == points[ 0 ][ 0 ] && points[ 3 ][ 1 ] > points[ 0 ][ 1 ] &&
                points[ 4 ][ 0 ] == points[ 2 ][ 0 ] && points[ 4 ][ 1 ] == points[ 3 ][ 1 ] &&
                points[ 5 ][ 0 ] == points[ 3 ][ 0 ] && points[ 5 ][ 1 ] > points[ 3 ][ 1 ] &&
                points[ 6 ][ 0 ] == points[ 1 ][ 0 ] && points[ 6 ][ 1 ] == points[ 5 ][ 1 ] &&
                points[ 7 ][ 0 ] == points[ 2 ][ 0 ] && points[ 7 ][ 1 ] == points[ 6 ][ 1 ];
            if ( f )
                Console.WriteLine("respectable");
            else
                Console.WriteLine("ugly");
        }

        static int _current = -1;
        static string[] _words = null;
        static int ReadInt() {
            if ( _current == -1 ) {
                _words = Console.ReadLine().Split(new char[] { ' ', '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
                _current = 0;
            }

            int value = int.Parse(_words[ _current ]);
            if ( _current == _words.Length - 1 )
                _current = -1;
            else
                _current++;

            return value;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication4
{
    class Program
    {
        static void Main(string[] args)
        {
            var b = Solve();
            Console.WriteLine(b ? "respectable" : "ugly");
        }

        public static bool Solve()
        {
            var points = new List<Point>();
            for (int i = 0; i < 8; i++)
            {
                var line = Console.ReadLine().Split(' ');
                points.Add(new Point(int.Parse(line[0]), int.Parse(line[1])));
            }

            int maxX = points.Select(p => p.x).Max();
            int minX = points.Select(p => p.x).Min();
            int maxY = points.Select(p => p.y).Max();
            int minY = points.Select(p => p.y).Min();

            int midX, midY;
            try
            {
                midX = points.Select(p => p.x).Where(x => x < maxX && x > minX).First();
                midY = points.Select(p => p.y).Where(y => y < maxY && y > minY).First();
            }
            catch { return false; }

            if (points.Contains(new Point(minX, minY)) &&
                points.Contains(new Point(midX, minY)) &&
                points.Contains(new Point(maxX, minY)) &&
                points.Contains(new Point(minX, midY)) &&
                points.Contains(new Point(maxX, midY)) &&
                points.Contains(new Point(minX, maxY)) &&
                points.Contains(new Point(midX, maxY)) &&
                points.Contains(new Point(maxX, maxY)))
                return true;
            else
                return false;
        }
        struct Point
        {
            public int x;
            public int y;

            public Point(int x, int y)
            {
                this.x = x;
                this.y = y;
            }

            public override bool Equals(object obj)
            {
                var p = (Point)obj;
                return p.x == x && p.y == y;
            }

            public override int GetHashCode()
            {
                return x.GetHashCode() ^ y.GetHashCode();
            }
        }
    }
}

using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

class Demo
{
    static void Main()
    {
        List<int[]> a = Enumerable.Range(0, 8)
            .Select(x => Console.ReadLine()
                .Split()
                .Select(int.Parse)
                .ToArray())
                .ToList();
        if (a.Select(x => x[0]).Distinct().Count() != 3
            | a.Select(x => x[1]).Distinct().Count() != 3)
        { Console.WriteLine("ugly"); return; }

        int minX= a.Select(x=>x[0]).Min();
        int minY= a.Select(x=>x[1]).Min();
        int maxX= a.Select(x=>x[0]).Max();
        int maxY= a.Select(x=>x[1]).Max();

        int[] x1 = a.Where(x => x[0] == minX).Select(x => x[1]).ToArray();
        int[] x2 = a.Where(x => x[0] == maxX).Select(x => x[1]).ToArray();
        Array.Sort(x1);
        Array.Sort(x2);
        if (!x1.SequenceEqual(x2)) { Console.WriteLine("ugly"); return; }

        int[] y1 = a.Where(x => x[1] == minY).Select(x => x[0]).ToArray();
        int[] y2 = a.Where(x => x[1] == maxY).Select(x => x[0]).ToArray();
        Array.Sort(y1);
        Array.Sort(y2);
        if (!y1.SequenceEqual(y2)) { Console.WriteLine("ugly"); return; }

        Console.WriteLine("respectable");
    }
}

using System;
using System.IO;
using System.Linq;
using System.Text;

namespace Eight_Point_Sets
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            writer.WriteLine(Solve() ? "respectable" : "ugly");
            writer.Flush();
        }

        private static bool Solve()
        {
            var x = new int[8];
            var y = new int[8];

            for (int i = 0; i < 8; i++)
            {
                x[i] = Next();
                y[i] = Next();
            }

            int t = Enumerable.Range(0, 8).Select(i => new {X = x[i], Y = y[i]}).GroupBy(e => new {e.X, e.Y}).Select(g => g.Key).Count();
            if (t != 8)
                return false;

            var xx = x.GroupBy(e => e).Select(g => new {X = g.Key, Count = g.Count()}).OrderBy(r => r.X).ToList();

            if (xx.Count != 3 || xx[0].Count != 3 || xx[1].Count != 2)
                return false;

            var yy = y.GroupBy(e => e).Select(g => new {Y = g.Key, Count = g.Count()}).ToList().OrderBy(r => r.Y).ToList();
            if (yy.Count != 3 || yy[0].Count != 3 || yy[1].Count != 2)
                return false;

            return true;
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}

#define ONLINE_JUDGE

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Linq;

class Program
{

    static int tests = 1;

#if (ONLINE_JUDGE)
    static TextReader r = Console.In;
    static TextWriter w = Console.Out;
#else
    static string path = @"C:\Y\Prog\Codeforces\194\";
    static string answerFile = "0{0}Answer.txt";
    static string resultFile = "0{0}Result.txt";
    static string sourceFile = "0{0}Source.txt";

    static TextReader r;
    static TextWriter w;
#endif

    static void Main(string[] args)
    {

        //int[] t = { 3, 2, 3, 3, 100, 1, 500 };
        //int[] xDistinct = t.Distinct().OrderBy( a => a ).ToArray();

        for (int i = 1; i <= tests; i++)
        {
#if (!ONLINE_JUDGE)
            r = new StreamReader(string.Format(path + sourceFile, i));
            w = new StreamWriter(string.Format(path + resultFile, i), false);
#endif
            int[] x = new int[8];
            int[] y = new int[8];
            for (int j = 0; j < 8; j++)
            {
                string[] buff = r.ReadLine().Split(' ');
                x[j] = Convert.ToInt32(buff[0]);
                y[j] = Convert.ToInt32(buff[1]);
            }
            solve(x, y);

#if (!ONLINE_JUDGE)
            w.Flush(); w.Close();
            Console.WriteLine("CASE: {0}", i);
            string answer = File.ReadAllText(string.Format(path + answerFile, i));
            string result = File.ReadAllText(string.Format(path + resultFile, i));
            if (answer != result)
            {
                Console.WriteLine("FAIL:");
                Console.WriteLine("Result" + Environment.NewLine + result);
                Console.WriteLine("Answer" + Environment.NewLine + answer);
            }
            else
                Console.WriteLine("OK");
#endif
        }
    }

    public static void solve(int[] x, int[] y)
    {
        int[] xDistinct = x.Distinct().OrderBy( a => a ).ToArray();
        int[] yDistinct = y.Distinct().OrderBy( a => a ).ToArray();

        if (xDistinct.Length != 3 || yDistinct.Length != 3)
        {
            w.WriteLine("ugly");
            return;
        }
        for (int i = 0; i < xDistinct.Length; i++)
            for (int j = 0; j < yDistinct.Length; j++)
            {
                if (i == 1 && j == 1) continue;
                bool find = false;
                for (int k = 0; k < x.Length; k++)
                {
                    if (x[k] == xDistinct[i] && y[k] == yDistinct[j])
                        find = true;
                }
                if (!find)
                {
                    w.WriteLine("ugly");
                    return;
                }
            }
        w.WriteLine("respectable");
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CodeForces
{
    class R194_Div2_B
    {
        static void Main(string[] args)
        {
            int n = 8;

            List<int> a = new List<int>();
            List<int> b = new List<int>();

            int[] x = new int[n];
            int[] y = new int[n];
            for (int i = 0; i < n; i++)
            {
                string[] s = Console.ReadLine().Split();
                x[i] = int.Parse(s[0]);
                y[i] = int.Parse(s[1]);
                if (!a.Contains(x[i])) a.Add(x[i]);
                if (!b.Contains(y[i])) b.Add(y[i]);
            }

            if (a.Count == 3 && b.Count == 3)
            {
                a.Sort(); b.Sort();
                bool ugly;
                for (int i = 0; i < 3; i++)
                {
                    for (int j = 0; j < 3; j++)
                    {
                        if (i == 1 && j == 1)
                        {
                            ugly = false;
                            for (int k = 0; k < n; k++)
                                if (x[k] == a[i] && y[k] == b[j])
                                {
                                    ugly = true;
                                    break;
                                }
                            if (ugly)
                            {
                                Console.WriteLine("ugly");
                                return;
                            }
                        }
                        else
                        {
                            ugly = true;
                            for (int k = 0; k < n; k++)
                                if (x[k] == a[i] && y[k] == b[j])
                                {
                                    ugly = false;
                                    break;
                                }
                            if (ugly)
                            {
                                Console.WriteLine("ugly");
                                return;
                            }
                        }
                    }
                }
                Console.WriteLine("respectable");
            }
            else
            {
                Console.WriteLine("ugly");
            }
        }
    }
}

using System;

public class Program
{
    public class MyPoint : IComparable<MyPoint>
    {
        public int x, y;

        public MyPoint(int x, int y)
        {
            this.x = x;
            this.y = y;
        }

        public int CompareTo(MyPoint other)
        {
            if (other.x != this.x)
                return this.x - other.x;
            return this.y - other.y;
        }
    }

    public static void Main()
    {
        MyPoint[] ps = new MyPoint[8];
        string[] line;

        for (int i = 0; i < 8; i++)
        {
            line = Console.ReadLine().Split(' ');
            ps[i] = new MyPoint(int.Parse(line[0]), int.Parse(line[1]));
        }

        Array.Sort(ps);

        if (ps[0].x == ps[1].x && ps[0].x == ps[2].x && ps[3].x == ps[4].x && ps[5].x == ps[6].x && ps[5].x == ps[7].x &&
            ps[0].x != ps[3].x && ps[3].x != ps[5].x && ps[0].x != ps[5].x && ps[0].y == ps[3].y && ps[0].y == ps[5].y &&
            ps[1].y == ps[6].y && ps[2].y == ps[4].y && ps[2].y == ps[7].y && ps[0].y != ps[1].y && ps[1].y != ps[2].y &&
            ps[0].y != ps[2].y)
            Console.WriteLine("respectable");
        else
            Console.WriteLine("ugly");
    }
}

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace prB {
    internal class Program {
        static void Main(string[] args) {
#if ONLINE_JUDGE
#else

            StreamWriter sw = new StreamWriter("output");
            Console.SetOut(sw);
            Console.SetIn(new StreamReader("input"));
#endif

            List<int> x = new List<int>();
            List<int> y = new List<int>();
            int[] xs = new int[8];
            int[] ys = new int[8];
            for(int i = 0; i < 8; i++) {
                string[] ss = Console.ReadLine().Split(' ');
                xs[i] = int.Parse(ss[0]);
                ys[i] = int.Parse(ss[1]);
                int index = x.BinarySearch(xs[i]);
                if(index < 0) {
                    index = ~index;
                    x.Insert(index, xs[i]);
                }
                index = y.BinarySearch(ys[i]);
                if(index < 0) {
                    index = ~index;
                    y.Insert(index, ys[i]);
                }
            }
            bool good = !(x.Count != 3 || y.Count != 3);
            if(good) {
                int[] hx = new int[3];
                int[] hy = new int[3];
                for(int i = 0; i < 8; i++) {
                    hx[x.BinarySearch(xs[i])]++;
                    hy[y.BinarySearch(ys[i])]++;
                }
                if(hx[0] != 3 || hx[1] != 2 || hx[2] != 3 || hy[0] != 3 || hy[1] != 2 || hy[2] != 3) {
                    good = false;
                }
                if(good) {
                    int cury = y[0];
                    for(int i = 0; i < 8; i++) {
                        if(ys[i] == cury) {
                            hx[x.BinarySearch(xs[i])]--;
                        }
                    }
                    if(hx[0] != 2 || hx[1] != 1 || hx[2] != 2) {
                        good = false;
                    }
                    else {
                        cury = y[1];
                        for(int i = 0; i < 8; i++) {
                            if(ys[i] == cury) {
                                hx[x.BinarySearch(xs[i])]--;
                            }
                        }
                        if(hx[0] != 1 || hx[1] != 1 || hx[2] != 1) {
                            good = false;
                        }
                        else {
                            cury = y[2];
                            for(int i = 0; i < 8; i++) {
                                if(ys[i] == cury) {
                                    hx[x.BinarySearch(xs[i])]--;
                                }
                            }
                            if(hx[0] != 0 || hx[1] != 0 || hx[2] != 0) {
                                good = false;
                            }
                            else {
                                int curx = x[2];
                                for(int i = 0; i < 8; i++) {
                                    if(xs[i] == curx) {
                                        hy[y.BinarySearch(ys[i])]--;
                                    }
                                }
                                if(hy[0] != 2 || hy[1] != 1 || hy[2] != 2) {
                                    good = false;
                                }
                                else {
                                    curx = x[1];
                                    for(int i = 0; i < 8; i++) {
                                        if(xs[i] == curx) {
                                            hy[y.BinarySearch(ys[i])]--;
                                        }
                                    }
                                    if(hy[0] != 1 || hy[1] != 1 || hy[2] != 1) {
                                        good = false;
                                    }
                                    else {
                                        curx = x[2];
                                        for(int i = 0; i < 8; i++) {
                                            if(xs[i] == curx) {
                                                hy[y.BinarySearch(ys[i])]--;
                                            }
                                        }
                                        if(hy[0] != 0 || hy[1] != 0 || hy[2] != 0) {
                                            good = false;
                                        }
                                        else {
                                            for(int i = 0; i < 8; i++) {
                                                if(xs[i] == x[1] && ys[i] == y[1])
                                                    good = false;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            Console.WriteLine(good ? "respectable" : "ugly");

#if ONLINE_JUDGE
#else
            sw.Close();
#endif
        }
    }
}

using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

class Program
{
    static void Main()
    {
        int xMin = -1, yMin = -1, xMax = -1, yMax = -1;

        var list = new List<string>();

        var yd = new Dictionary<int, List<int[]>>();
        var xd = new Dictionary<int, List<int[]>>();

        for (int i = 0; i < 8; i++)
        {
            string str = Console.ReadLine();

            int x = int.Parse(str.Split(new char[] { ' ' })[0]);
            int y = int.Parse(str.Split(new char[] { ' ' })[1]);

            if (xMin == -1 || xMin > x) xMin = x;
            if (xMax == -1 || xMax < x) xMax = x;
            if (yMin == -1 || yMin > y) yMin = y;
            if (yMax == -1 || yMax < y) yMax = y;

            if (!xd.ContainsKey(x)) xd.Add(x, new List<int[]>());
            if (!yd.ContainsKey(y)) yd.Add(y, new List<int[]>());

            xd[x].Add(new int[] { x, y });
            yd[y].Add(new int[] { x, y });

            if (list.Contains(str))
            {
                Console.WriteLine("ugly");
                return;
            }

            list.Add(str);
        }

        // 0 0, 1 0
        // 0 1,
        // 0 2, 1 2, 2 2

        if (xd.Count != 3 || yd.Count != 3)
        {
            Console.WriteLine("ugly");
            return;
        }

        if (!xd.ContainsKey(xMin) || !xd.ContainsKey(xMax) || xd[xMin].Count != 3 || xd[xMax].Count != 3 ||
            !yd.ContainsKey(yMin) || !yd.ContainsKey(yMax) || yd[yMin].Count != 3 || yd[yMax].Count != 3)
        {
            Console.WriteLine("ugly");
            return;
        }

        Console.WriteLine("respectable");
    }
}

#define Online

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.IO;
using System.Numerics;

namespace CF
{
    delegate double F(double x);
    delegate decimal Fdec(decimal x);

    partial class Program
    {

        static void Main(string[] args)
        {

#if FileIO
            StreamReader sr = new StreamReader("input.txt");
            StreamWriter sw = new StreamWriter("output.txt");
            Console.SetIn(sr);
            Console.SetOut(sw);
#endif

            B();

#if Online
            Console.ReadLine();
#endif

#if FileIO
            sr.Close();
            sw.Close();
#endif
        }

        static void A()
        {

        }

        static void B()
        {
            int[,] points = new int[8, 2];
            for (int i = 0; i < 8; i++)
            {
                ReadArray(' ');
                points[i, 0] = NextInt();
                points[i, 1] = NextInt();
            }
            int[] x = new int[1000001];
            for (int i = 0; i < 8; i++)
                x[points[i, 0]]++;
            int[] next = { 3, 2, 3 };
            for (int i = 0, z = 0; i <= 1000000; i++)
            {
                if (x[i] == 0) continue;
                if (x[i] == next[z])
                {
                    z++;
                }
                else
                {
                    Console.WriteLine("ugly");
                    return;
                }
            }
            int[] y = new int[1000001];
            for (int i = 0, k = 0; i <= 1000000 && k < 3; i++)
            {
                if (x[i] == next[k])
                {
                    for (int j = 0; j <= 1000000; j++)
                    {
                        for (int z = 0; z < 8; z++)
                        {
                            if (points[z, 1] == j && points[z, 0] == i)
                            {
                                y[j]++;
                                break;
                            }
                        }
                    }
                    k++;
                }
            }
            for (int i = 0, k = 0; i <= 1000000 && k < 3; i++)
            {
                if (y[i] == 0) continue;
                if (y[i] == next[k])
                {
                    k++;
                }
                else
                {
                    Console.WriteLine("ugly");
                    return;
                }
            }
            List<int> t = new List<int>();
            for (int i = 0, z = 0; i <= 1000000; i++)
            {
                if (y[i] == 3 && z == 0)
                {
                    for (int p = 0; p <= 1000000; p++)
                    {
                        for (int j = 0; j < 8; j++)
                            if (points[j, 1] == i && points[j, 0] == p)
                                t.Add(points[j, 0]);
                    }
                    z++;
                }
                if (y[i] == 2)
                {
                    for (int p = 0; p <= 1000000; p++)
                    {
                        for (int j = 0; j < 8; j++)
                            if (points[j, 1] == i && points[j, 0] == p)
                                t.Add(points[j, 0]);
                    }
                    if (t[3] != t[0] || t[4] != t[2])
                    {
                        Console.WriteLine("ugly");
                        return;
                    }
                    z++;
                }
                if (y[i] == 3 && z == 2)
                {
                    for (int p = 0; p <= 1000000; p++)
                    {
                        for (int j = 0; j < 8; j++)
                            if (points[j, 1] == i && points[j, 0] == p)
                                t.Add(points[j, 0]);
                    }
                    for (int j = 0; j < 3; j++)
                    {
                        if (t[j] != t[5 + j])
                        {
                            Console.WriteLine("ugly");
                            return;
                        }
                    }

                }
            }
            Console.WriteLine("respectable");

        }

        static void C()
        {
            long n = ReadLong();
            long ans = 0;
            if (n == 1)
                ans = 1;
            if (n == 2)
                ans = 1;
            if (n == 3)
                ans = 1;
            if (n > 3)
                ans = n - 2;
            Console.WriteLine(ans);
        }

        static void D()
        {

        }

        static void E()
        {

        }

        static void TestGen()
        {

        }

    }

    public static class MyMath
    {
        public static long BinPow(long a, long n, long mod)
        {
            long res = 1;
            while (n > 0)
            {
                if ((n & 1) == 1)
                {
                    res = (res * a) % mod;
                }
                a = (a * a) % mod;
                n >>= 1;
            }
            return res;
        }

        public static long GCD(long a, long b)
        {
            while (b != 0) b = a % (a = b);
            return a;
        }

        public static int GCD(int a, int b)
        {
            while (b != 0) b = a % (a = b);
            return a;
        }

        public static long LCM(long a, long b)
        {
            return (a * b) / GCD(a, b);
        }

        public static int LCM(int a, int b)
        {
            return (a * b) / GCD(a, b);
        }
    }

    static class ArrayUtils
    {
        public static int BinarySearch(int[] a, int val)
        {
            int left = 0;
            int right = a.Length - 1;
            int mid;

            while (left < right)
            {
                mid = left + ((right - left) >> 1);
                if (val <= a[mid])
                {
                    right = mid;
                }
                else
                {
                    left = mid + 1;
                }
            }

            if (a[left] == val)
                return left;
            else
                return -1;
        }

        public static double Bisection(F f, double left, double right, double eps)
        {
            double mid;
            while (right - left > eps)
            {
                mid = left + ((right - left) / 2d);
                if (Math.Sign(f(mid)) != Math.Sign(f(left)))
                    right = mid;
                else
                    left = mid;
            }
            return (left + right) / 2d;
        }

        public static decimal TernarySearchDec(Fdec f, decimal eps, decimal l, decimal r, bool isMax)
        {
            decimal m1, m2;
            while (r - l > eps)
            {
                m1 = l + (r - l) / 3m;
                m2 = r - (r - l) / 3m;
                if (f(m1) < f(m2))
                    if (isMax)
                        l = m1;
                    else
                        r = m2;
                else
                    if (isMax)
                        r = m2;
                    else
                        l = m1;
            }
            return r;
        }

        public static double TernarySearch(F f, double eps, double l, double r, bool isMax)
        {
            double m1, m2;
            while (r - l > eps)
            {
                m1 = l + (r - l) / 3d;
                m2 = r - (r - l) / 3d;
                if (f(m1) < f(m2))
                    if (isMax)
                        l = m1;
                    else
                        r = m2;
                else
                    if (isMax)
                        r = m2;
                    else
                        l = m1;
            }
            return r;
        }

        public static void Merge<T>(T[] A, int p, int q, int r, T[] L, T[] R, Comparison<T> comp)
        {
            for (int i = p; i <= q; i++)
                L[i] = A[i];
            for (int i = q + 1; i <= r; i++)
                R[i] = A[i];

            for (int k = p, i = p, j = q + 1; k <= r; k++)
            {
                if (i > q)
                {
                    for (; k <= r; k++, j++)
                        A[k] = R[j];
                    return;
                }
                if (j > r)
                {
                    for (; k <= r; k++, i++)
                        A[k] = L[i];
                    return;
                }
                if (comp(L[i], R[j]) <= 0)
                {
                    A[k] = L[i];
                    i++;
                }
                else
                {
                    A[k] = R[j];
                    j++;
                }
            }
        }

        public static void Merge_Sort<T>(T[] A, int p, int r, T[] L, T[] R, Comparison<T> comp)
        {
            if (p >= r) return;
            int q = p + ((r - p) >> 1);
            Merge_Sort(A, p, q, L, R, comp);
            Merge_Sort(A, q + 1, r, L, R, comp);
            Merge(A, p, q, r, L, R, comp);
        }

        public static void Merge<T>(T[] A, int p, int q, int r, T[] L, T[] R) where T : IComparable<T>
        {
            for (int i = p; i <= q; i++)
                L[i] = A[i];
            for (int i = q + 1; i <= r; i++)
                R[i] = A[i];

            for (int k = p, i = p, j = q + 1; k <= r; k++)
            {
                if (i > q)
                {
                    for (; k <= r; k++, j++)
                        A[k] = R[j];
                    return;
                }
                if (j > r)
                {
                    for (; k <= r; k++, i++)
                        A[k] = L[i];
                    return;
                }
                if (L[i].CompareTo(R[j]) >= 0)
                {
                    A[k] = L[i];
                    i++;
                }
                else
                {
                    A[k] = R[j];
                    j++;
                }
            }
        }

        public static void Merge_Sort<T>(T[] A, int p, int r, T[] L, T[] R) where T : IComparable<T>
        {
            if (p >= r) return;
            int q = p + ((r - p) >> 1);
            Merge_Sort(A, p, q, L, R);
            Merge_Sort(A, q + 1, r, L, R);
            Merge(A, p, q, r, L, R);
        }

        public static void Merge_Sort1<T>(T[] A, int p, int r, T[] L, T[] R) where T : IComparable<T>
        {
            int k = 1;
            while (k < r - p + 1)
            {
                int i = 0;
                while (i < r)
                {
                    int _r = Math.Min(i + 2 * k - 1, r);
                    int q = Math.Min(i + k - 1, r);
                    Merge(A, i, q, _r, L, R);
                    i += 2 * k;
                }
                k <<= 1;
            }
        }

        public static void Merge_Sort1<T>(T[] A, int p, int r, T[] L, T[] R, Comparison<T> comp)
        {
            int k = 1;
            while (k < r - p + 1)
            {
                int i = 0;
                while (i < r)
                {
                    int _r = Math.Min(i + 2 * k - 1, r);
                    int q = Math.Min(i + k - 1, r);
                    Merge(A, i, q, _r, L, R, comp);
                    i += 2 * k;
                }
                k <<= 1;
            }
        }

        static void Shake<T>(T[] a)
        {
            Random rnd = new Random(Environment.TickCount);
            T temp;
            int b, c;
            for (int i = 0; i < a.Length; i++)
            {
                b = rnd.Next(0, a.Length);
                c = rnd.Next(0, a.Length);
                temp = a[b];
                a[b] = a[c];
                a[c] = temp;
            }
        }
    }

    partial class Program
    {
        static string[] tokens;
        static int cur_token = 0;

        static void ReadArray(char sep)
        {
            cur_token = 0;
            tokens = Console.ReadLine().Split(sep);
        }

        static int ReadInt()
        {
            return int.Parse(Console.ReadLine());
        }

        static long ReadLong()
        {
            return long.Parse(Console.ReadLine());
        }

        static int NextInt()
        {
            return int.Parse(tokens[cur_token++]);
        }

        static long NextLong()
        {
            return long.Parse(tokens[cur_token++]);
        }

        static double NextDouble()
        {
            return double.Parse(tokens[cur_token++]);
        }

        static decimal NextDecimal()
        {
            return decimal.Parse(tokens[cur_token++]);
        }

        static string NextToken()
        {
            return tokens[cur_token++];
        }

        static string ReadLine()
        {
            return Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace c194p2
{
    class Program
    {
        class Vector
        {
            public int x, y;
            public Vector(string[] strs)
            {
                x = Convert.ToInt32(strs[0]);
                y = Convert.ToInt32(strs[1]);
            }
        }
        static void Main(string[] args)
        {
            new Program();
        }
        Program()
        {
            const string ugly = "ugly", respectable = "respectable";
            const int N = 8;
            Vector[] ps = new Vector[N];
            SortedSet<int> sX = new SortedSet<int>();
            SortedSet<int> sY = new SortedSet<int>();
            for (int i = 0; i < N; i++)
            {
                ps[i] = new Vector(Console.ReadLine().Split(new char[] { ' ' }));
                sX.Add(ps[i].x);
                sY.Add(ps[i].y);
            }
            if (sX.Count != 3 || sY.Count != 3)
            {
                Console.WriteLine(ugly);
                return;
            }
            List<int> lX = sX.ToList<int>();
            List<int> lY = sY.ToList<int>();
            for (int i = 0; i < sX.Count; i++)
            {
                for (int j = 0; j < sY.Count; j++)
                {
                    if (i == 1 && j == 1)
                        continue;
                    bool isUgly = true;
                    for (int k = 0; k < N; k++)
                    {
                        if (ps[k].x == lX[i] && ps[k].y == lY[j])
                            isUgly = false;
                    }
                    if (isUgly)
                    {
                        Console.WriteLine(ugly);
                        return;
                    }
                }
            }
            Console.WriteLine(respectable);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _334B_Eight_Points_Set
{
    class Point : IComparable<Point>
    {
        public int X;
        public int Y;

        public int CompareTo(Point other)
        {
            if (X < other.X) return -1;
            if (X == other.X)
            {
                if (Y < other.Y) return -1;
                if (Y == other.Y) return 0;
                return 1;
            }
            return 1;
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            Point[] points = new Point[8];
            for (int i = 0; i < 8; i++)
            {
                var input = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
                points[i] = new Point() {X = input[0], Y = input[1]};
            }

            Array.Sort(points);

            if (points[0].X == points[1].X && points[1].X == points[2].X &&
                points[3].X == points[4].X &&
                points[5].X == points[6].X && points[6].X == points[7].X &&

                points[0].Y == points[3].Y && points[3].Y == points[5].Y &&
                points[1].Y == points[6].Y &&
                points[2].Y == points[4].Y && points[4].Y == points[7].Y &&

                points[0].X != points[3].X && points[3].X != points[5].X &&
                points[0].Y != points[1].Y && points[1].Y != points[2].Y)
            {
                Console.WriteLine("respectable");
            }
            else
            {
                Console.WriteLine("ugly");
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Threading;

namespace Temp
{
    public class PointInt
    {
        public long X;

        public long Y;

        public PointInt(long x, long y)
        {
            this.X = x;
            this.Y = y;
        }

        public PointInt(PointInt head)
            : this(head.X, head.Y)
        {
        }

        public static PointInt operator +(PointInt a, PointInt b)
        {
            return new PointInt(a.X + b.X, a.Y + b.Y);
        }

        public static PointInt operator -(PointInt a, PointInt b)
        {
            return new PointInt(a.X - b.X, a.Y - b.Y);
        }

        public static PointInt operator *(PointInt a, long k)
        {
            return new PointInt(k * a.X, k * a.Y);
        }

        public static PointInt operator *(long k, PointInt a)
        {
            return new PointInt(k * a.X, k * a.Y);
        }

        public bool IsInsideRectangle(long l, long b, long r, long t)
        {
            return (l <= X) && (X <= r) && (b <= Y) && (Y <= t);
        }

        public bool Equals(PointInt other)
        {
            if (ReferenceEquals(null, other))
            {
                return false;
            }
            if (ReferenceEquals(this, other))
            {
                return true;
            }
            return other.X == this.X && other.Y == this.Y;
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj))
            {
                return false;
            }
            if (ReferenceEquals(this, obj))
            {
                return true;
            }
            if (obj.GetType() != typeof(PointInt))
            {
                return false;
            }
            return Equals((PointInt)obj);
        }

        public override int GetHashCode()
        {
            unchecked
            {
                return (this.X.GetHashCode() * 397) ^ this.Y.GetHashCode();
            }
        }
    }

    public class Point2DReal
    {
        public double X;

        public double Y;

        public Point2DReal(double x, double y)
        {
            this.X = x;
            this.Y = y;
        }

        public Point2DReal(Point2DReal head)
            : this(head.X, head.Y)
        {
        }

        public static Point2DReal operator +(Point2DReal a, Point2DReal b)
        {
            return new Point2DReal(a.X + b.X, a.Y + b.Y);
        }

        public static Point2DReal operator -(Point2DReal a, Point2DReal b)
        {
            return new Point2DReal(a.X - b.X, a.Y - b.Y);
        }

        public static Point2DReal operator *(Point2DReal a, double k)
        {
            return new Point2DReal(k * a.X, k * a.Y);
        }

        public static Point2DReal operator *(double k, Point2DReal a)
        {
            return new Point2DReal(k * a.X, k * a.Y);
        }

        public double Dist(Point2DReal p)
        {
            return Math.Sqrt((p.X - X) * (p.X - X) + (p.Y - Y) * (p.Y - Y));
        }

        public bool IsInsideRectangle(double l, double b, double r, double t)
        {
            return (l <= X) && (X <= r) && (b <= Y) && (Y <= t);
        }
    }

    internal class LineInt
    {
        public LineInt(PointInt a, PointInt b)
        {
            A = a.Y - b.Y;
            B = b.X - a.X;
            C = a.X * b.Y - a.Y * b.X;
        }

        public long A, B, C;

        public bool ContainsPoint(PointInt p)
        {
            return A * p.X + B * p.Y + C == 0;
        }

        public int Sign(PointInt p)
        {
            return Math.Sign(A * p.X + B * p.Y + C);
        }
    }

    internal static class Geometry
    {
        public static long VectInt(PointInt a, PointInt b)
        {
            return a.X * b.Y - a.Y * b.X;
        }

        public static long VectInt(PointInt a, PointInt b, PointInt c)
        {
            return (b.X - a.X) * (c.Y - a.Y) - (b.Y - a.Y) * (c.X - a.X);
        }
    }

    internal class MatrixInt
    {
        private readonly long[,] m_Matrix;

        public int Size
        {
            get { return m_Matrix.GetLength(0); }
        }

        public long Mod { get; private set; }

        public MatrixInt(int size, long mod = 0)
        {
            m_Matrix = new long[size,size];
            Mod = mod;
        }

        public MatrixInt(long[,] matrix, long mod = 0)
        {
            var size = matrix.GetLength(0);
            m_Matrix = new long[size,size];
            Array.Copy(matrix, m_Matrix, size * size);
            Mod = mod;

            if (mod != 0)
            {
                for (int i = 0; i < size; i++)
                {
                    for (int j = 0; j < size; j++)
                    {
                        m_Matrix[i, j] %= mod;
                    }
                }
            }
        }

        public static MatrixInt IdentityMatrix(int size, long mod = 0)
        {
            long[,] matrix = new long[size,size];

            for (int i = 0; i < size; i++)
            {
                matrix[i, i] = 1;
            }

            return new MatrixInt(matrix, mod);
        }

        public long this[int i, int j]
        {
            get { return m_Matrix[i, j]; }

            set { m_Matrix[i, j] = value; }
        }

        public static MatrixInt operator +(MatrixInt a, MatrixInt b)
        {
            int n = a.Size;
            long mod = Math.Max(a.Mod, b.Mod);
            long[,] c = new long[n,n];
            for (int i = 0; i < n; i++)
            {
                for (int j = 0; j < n; j++)
                {
                    c[i, j] = a[i, j] + b[i, j];
                }
            }

            if (mod > 0)
            {
                for (int i = 0; i < n; i++)
                {
                    for (int j = 0; j < n; j++)
                    {
                        c[i, j] %= mod;
                    }
                }
            }

            return new MatrixInt(c, mod);
        }

        public static MatrixInt operator *(MatrixInt a, MatrixInt b)
        {
            int n = a.Size;
            long mod = Math.Max(a.Mod, b.Mod);

            long[,] c = new long[n,n];

            for (int i = 0; i < n; i++)
            {
                for (int j = 0; j < n; j++)
                {
                    for (int k = 0; k < n; k++)
                    {
                        c[i, j] += a[i, k] * b[k, j];
                        if (mod > 0)
                        {
                            c[i, j] %= mod;
                        }
                    }
                }
            }

            return new MatrixInt(c, mod);
        }

        public void Print()
        {
            for (int i = 0; i < Size; i++)
            {
                for (int j = 0; j < Size; j++)
                {
                    Console.Write("{0} ", m_Matrix[i, j]);
                }
                Console.WriteLine();
            }
        }
    }

    public static class Permutations
    {
        private static readonly Random m_Random;

        static Permutations()
        {
            m_Random = new Random();
        }

        public static int[] GetRandomPermutation(int n)
        {
            int[] p = new int[n];
            for (int i = 0; i < n; i++)
            {
                p[i] = i;
            }

            for (int i = n - 1; i > 0; i--)
            {
                int j = m_Random.Next(i + 1);
                int tmp = p[i];
                p[i] = p[j];
                p[j] = tmp;
            }

            return p;
        }

        /*public static T[] Shuffle<T>(this T[] array)
        {
            int length = array.Length;
            int[] p = GetRandomPermutation(length);
            T[] result = new T[length];
            for (int i = 0; i < length; i++)
            {
                result[i] = array[p[i]];
            }

            return result;
        }*/

        /*public static T[] ShuffleSort<T>(this T[] array)
        {
            var result = array.Shuffle();
            Array.Sort(result);
            return result;
        }*/

        public static void Shuffle<T>(T[] array)
        {
            var n = array.Count();
            for (int i = n - 1; i > 0; i--)
            {
                int j = m_Random.Next(i + 1);
                T tmp = array[i];
                array[i] = array[j];
                array[j] = tmp;
            }
        }

        public static void ShuffleSort<T>(T[] array)
        {
            Shuffle(array);
            Array.Sort(array);
        }

        public static int[] Next(int[] p)
        {
            int n = p.Length;
            var next = new int[n];
            Array.Copy(p, next, n);

            int k = -1;
            for (int i = n - 1; i > 0; i--)
            {
                if (next[i - 1] < next[i])
                {
                    k = i - 1;
                    break;
                }
            }
            if (k == -1)
            {
                return null;
            }
            for (int i = n - 1; i >= 0; i--)
            {
                if (next[i] > next[k])
                {
                    var tmp = next[i];
                    next[i] = next[k];
                    next[k] = tmp;
                    break;
                }
            }
            for (int i = 1; i <= (n - k - 1) / 2; i++)
            {
                var tmp = next[k + i];
                next[k + i] = next[n - i];
                next[n - i] = tmp;
            }

            return next;
        }
    }

    internal static class Algebra
    {
        public static long Phi(long n)
        {
            long result = n;
            for (long i = 2; i * i <= n; i++)
            {
                if (n % i == 0)
                {
                    while (n % i == 0)
                    {
                        n /= i;
                    }

                    result -= result / i;
                }
            }

            if (n > 1)
            {
                result -= result / n;
            }

            return result;
        }

        public static long BinPower(long a, long n, long mod)
        {
            long result = 1;

            while (n > 0)
            {
                if ((n & 1) != 0)
                {
                    result = (result * a) % mod;
                }

                a = (a * a) % mod;
                n >>= 1;
            }

            return result;
        }

        public static MatrixInt MatrixBinPower(MatrixInt a, long n)
        {
            MatrixInt result = MatrixInt.IdentityMatrix(a.Size, a.Mod);

            while (n > 0)
            {
                if ((n & 1) != 0)
                {
                    result *= a;
                }

                a *= a;
                n >>= 1;
            }

            return result;
        }

        public static long Gcd(long a, long b)
        {
            return b == 0 ? a : Gcd(b, a % b);
        }

        public static long ExtendedGcd(long a, long b, out long x, out long y)
        {
            if (b == 0)
            {
                x = 1;
                y = 0;
                return a;
            }

            long x1;
            long y1;
            long d = ExtendedGcd(b, a % b, out x1, out y1);
            x = y1;
            y = x1 - (a / b) * y1;
            return d;
        }

        public static long Lcm(long a, long b)
        {
            return (a / Gcd(a, b)) * b;
        }

        public static bool[] GetPrimes(int n)
        {
            n = Math.Max(n, 2);
            bool[] prime = new bool[n + 1];
            for (int i = 2; i <= n; i++)
            {
                prime[i] = true;
            }

            for (int i = 2; i * i <= n; i++)
            {
                if (prime[i])
                {
                    if ((long)i * i <= n)
                    {
                        for (int j = i * i; j <= n; j += i)
                        {
                            prime[j] = false;
                        }
                    }
                }
            }

            return prime;
        }

        public static long GetFibonacciNumber(long n, long mod = 0)
        {
            long[,] matrix = new long[,] { { 0, 1 }, { 1, 1 } };

            MatrixInt result = MatrixBinPower(new MatrixInt(matrix, mod), n);

            return result[1, 1];
        }

        public static long[] GetFibonacciSequence(int n)
        {
            long[] result = new long[n];
            result[0] = result[1] = 1;

            for (int i = 2; i < n; i++)
            {
                result[i] = result[i - 1] + result[i - 2];
            }

            return result;
        }

        public static long GetInverseElement(long a, long mod)
        {
            long x, y;
            long g = ExtendedGcd(a, mod, out x, out y);

            if (g != 1)
            {
                return -1;
            }

            return ((x % mod) + mod) % mod;
        }

        public static long[] GetAllInverseElements(long n, long mod)
        {
            long[] result = new long[n];
            result[1] = 1;
            for (int i = 2; i < n; i++)
            {
                result[i] = (mod - (((mod / i) * result[mod % i]) % mod)) % mod;
            }

            return result;
        }

        public static int GetMinimalPrimeDivisor(int n)
        {
            for (int i = 2; i * i <= n; i++)
            {
                if (n % i == 0)
                {
                    return i;
                }
            }

            return n;
        }

        public static long Sqr(long x)
        {
            return x * x;
        }

        public static int SumOfDigits(long x, long baseMod = 10)
        {
            int res = 0;
            while (x > 0)
            {
                res += (int)(x % baseMod);
                x = x / baseMod;
            }
            return res;
        }
    }

    public static class OrderStatistic
    {
        public static T GetKthElement<T>(this IList<T> list, int k) where T : IComparable
        {
            return Select(list, 0, list.Count - 1, k);
        }

        private static T Select<T>(IList<T> list, int l, int r, int k) where T : IComparable
        {
            if (l == r)
                return list[l];

            T x = list[(l + r) / 2];
            var i = l;
            var j = r;
            do
            {
                while (list[i].CompareTo(x) < 0)
                    i++;
                while (list[j].CompareTo(x) > 0)
                    j--;
                if (i <= j)
                {
                    T tmp = list[i];
                    list[i] = list[j];
                    list[j] = tmp;

                    i++;
                    j--;
                }
            }
            while (i <= j);

            if (j < l)
                j++;
            if (k <= j - l + 1)
                return Select(list, l, j, k);
            return Select(list, j + 1, r, k - (j - l + 1));
        }
    }

    internal static class Reader
    {
        public static void Read<T>(out T v1)
        {
            var values = new T[1];
            Read(values);
            v1 = values[0];
        }

        public static void Read<T>(out T v1, out T v2)
        {
            var values = new T[2];
            Read(values);
            v1 = values[0];
            v2 = values[1];
        }

        public static void Read<T>(out T v1, out T v2, out T v3)
        {
            var values = new T[3];
            Read(values);
            v1 = values[0];
            v2 = values[1];
            v3 = values[2];
        }

        public static void Read<T>(out T v1, out T v2, out T v3, out T v4)
        {
            var values = new T[4];
            Read(values);
            v1 = values[0];
            v2 = values[1];
            v3 = values[2];
            v4 = values[3];
        }

        public static void Read<T>(out T v1, out T v2, out T v3, out T v4, out T v5)
        {
            var values = new T[5];
            Read(values);
            v1 = values[0];
            v2 = values[1];
            v3 = values[2];
            v4 = values[3];
            v5 = values[4];
        }

        public static void Read<T>(T[] values)
        {
            Read(values, values.Length);
        }

        public static void Read<T>(T[] values, int count)
        {
            // ReSharper disable PossibleNullReferenceException
            var list = Console.ReadLine().Split();
            // ReSharper restore PossibleNullReferenceException

            count = Math.Min(count, list.Length);

            var converter = TypeDescriptor.GetConverter(typeof(T));

            for (int i = 0; i < count; i++)
            {
                values[i] = (T)converter.ConvertFromString(list[i]);
            }
        }

        public static int[] ReadDigits()
        {
            // ReSharper disable AssignNullToNotNullAttribute
            return Console.ReadLine().Select(x => int.Parse(x.ToString(CultureInfo.InvariantCulture))).ToArray();
            // ReSharper restore AssignNullToNotNullAttribute
        }

        public static string ReadLine()
        {
            return Console.ReadLine();
        }
    }

    public interface IGraph
    {
        bool IsOriented { get; set; }

        int Vertices { get; set; }

        IList<int> this[int i] { get; }

        void AddEdge(int u, int v);

        void AddOrientedEdge(int u, int v);

        void AddNotOrientedEdge(int u, int v);
    }

    public class ListGraph : IGraph
    {
        private readonly List<int>[] m_Edges;

        public int Vertices { get; set; }

        public bool IsOriented { get; set; }

        public IList<int> this[int i]
        {
            get { return this.m_Edges[i]; }
        }

        public ListGraph(int vertices, bool isOriented = false)
        {
            this.Vertices = vertices;
            this.IsOriented = isOriented;

            this.m_Edges = new List<int>[vertices];

            for (int i = 0; i < vertices; i++)
            {
                this.m_Edges[i] = new List<int>();
            }
        }

        public void AddEdge(int u, int v)
        {
            this.AddOrientedEdge(u, v);
            if (!IsOriented)
            {
                this.AddOrientedEdge(v, u);
            }
        }

        public void AddNotOrientedEdge(int u, int v)
        {
            this.AddOrientedEdge(u, v);
            this.AddOrientedEdge(v, u);
        }

        public void AddOrientedEdge(int first, int second)
        {
            this.m_Edges[first].Add(second);
        }
    }

    public static class GraphAlgorithms
    {
        private static bool[] v;

        private static int[] a;

        private static int c;

        public static int[] Bfs(this IGraph graph, int start)
        {
            int[] d = new int[graph.Vertices];
            for (int i = 0; i < graph.Vertices; i++)
            {
                d[i] = -1;
            }

            Queue<int> queue = new Queue<int>();
            queue.Enqueue(start);
            d[start] = 0;

            while (queue.Count > 0)
            {
                int v = queue.Dequeue();
                foreach (int t in graph[v].Where(t => d[t] == -1))
                {
                    queue.Enqueue(t);
                    d[t] = d[v] + 1;
                }
            }

            return d;
        }

        public static int[] TopSort(this IGraph graph)
        {
            v = new bool[graph.Vertices];
            a = new int[graph.Vertices];
            c = graph.Vertices;

            for (int i = 0; i < graph.Vertices; i++)
            {
                if (!v[i])
                {
                    TopSortDfs(graph, i);
                }
            }

            return a;
        }

        private static void TopSortDfs(IGraph graph, int t)
        {
            v[t] = true;
            foreach (var next in graph[t])
            {
                if (!v[next])
                {
                    TopSortDfs(graph, next);
                }
            }
            c--;
            a[c] = t;
        }
    }

    internal class SimpleSumTable
    {
        private readonly int[,] m_Sum;

        public SimpleSumTable(int n, int m, int[,] table)
        {
            m_Sum = new int[n + 1,m + 1];

            for (int i = 1; i < n + 1; i++)
            {
                for (int j = 1; j < m + 1; j++)
                {
                    m_Sum[i, j] = m_Sum[i, j - 1] + m_Sum[i - 1, j] - m_Sum[i - 1, j - 1] + table[i - 1, j - 1];
                }
            }
        }

        public int GetSum(int l, int b, int r, int t)
        {
            return m_Sum[r + 1, t + 1] - m_Sum[r + 1, b] - m_Sum[l, t + 1] + m_Sum[l, b];
        }
    }

    internal class SegmentTreeSimpleInt<T>
    {
        public int Size { get; private set; }

        private readonly T[] m_Tree;

        private readonly Func<T, T, T> m_Operation;

        private readonly T m_Null;

        public SegmentTreeSimpleInt(int size, Func<T, T, T> operation, T nullElement, IList<T> array = null)
        {
            this.Size = size;
            this.m_Operation = operation;
            this.m_Null = nullElement;

            m_Tree = new T[4 * size];
            if (array != null)
            {
                this.Build(array, 1, 0, size - 1);
            }
        }

        private void Build(IList<T> array, int v, int tl, int tr)
        {
            if (tl == tr)
            {
                m_Tree[v] = array[tl];
            }
            else
            {
                int tm = (tl + tr) / 2;
                this.Build(array, 2 * v, tl, tm);
                this.Build(array, 2 * v + 1, tm + 1, tr);
                this.CalculateNode(v);
            }
        }

        public T GetSum(int l, int r)
        {
            return GetSum(1, 0, Size - 1, l, r);
        }

        private T GetSum(int v, int tl, int tr, int l, int r)
        {
            if (l > r)
            {
                return m_Null;
            }

            if (l == tl && r == tr)
            {
                return m_Tree[v];
            }

            int tm = (tl + tr) / 2;

            return this.m_Operation(
                GetSum(2 * v, tl, tm, l, Math.Min(r, tm)), GetSum(2 * v + 1, tm + 1, tr, Math.Max(l, tm + 1), r));
        }

        public void Update(int pos, T newValue)
        {
            Update(1, 0, Size - 1, pos, newValue);
        }

        private void Update(int v, int tl, int tr, int pos, T newValue)
        {
            if (tl == tr)
            {
                m_Tree[v] = newValue;
            }
            else
            {
                int tm = (tl + tr) / 2;
                if (pos <= tm)
                {
                    Update(2 * v, tl, tm, pos, newValue);
                }
                else
                {
                    Update(2 * v + 1, tm + 1, tr, pos, newValue);
                }
                this.CalculateNode(v);
            }
        }

        private void CalculateNode(int v)
        {
            m_Tree[v] = this.m_Operation(m_Tree[2 * v], m_Tree[2 * v + 1]);
        }
    }

    internal struct Pair<TFirst, TSecond>
    {
        public Pair(TFirst first, TSecond second)
            : this()
        {
            this.First = first;
            this.Second = second;
        }

        public TFirst First { set; get; }

        public TSecond Second { set; get; }

        private bool Equals(Pair<TFirst, TSecond> other)
        {
            return EqualityComparer<TFirst>.Default.Equals(this.First, other.First)
                   && EqualityComparer<TSecond>.Default.Equals(this.Second, other.Second);
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj))
            {
                return false;
            }
            if (ReferenceEquals(this, obj))
            {
                return true;
            }
            if (obj.GetType() != this.GetType())
            {
                return false;
            }
            return Equals((Pair<TFirst, TSecond>)obj);
        }

        public override int GetHashCode()
        {
            unchecked
            {
                return (EqualityComparer<TFirst>.Default.GetHashCode(this.First) * 397)
                       ^ EqualityComparer<TSecond>.Default.GetHashCode(this.Second);
            }
        }
    }

    internal class FenwickTreeInt64
    {
        public FenwickTreeInt64(int size)
        {
            this.m_Size = size;
            m_Tree = new long[size];
        }

        public FenwickTreeInt64(int size, IList<long> tree)
            : this(size)
        {
            for (int i = 0; i < size; i++)
            {
                Inc(i, tree[i]);
            }
        }

        public long Sum(int r)
        {
            long res = 0;
            for (; r >= 0; r = (r & (r + 1)) - 1)
            {
                res += m_Tree[r];
            }
            return res;
        }

        public long Sum(int l, int r)
        {
            return Sum(r) - Sum(l - 1);
        }

        public void Inc(int i, long x)
        {
            for (; i < m_Size; i = i | (i + 1))
            {
                m_Tree[i] += x;
            }
        }

        public void Set(int i, long x)
        {
            Inc(i, x - Sum(i, i));
        }

        private readonly int m_Size;

        private readonly long[] m_Tree;
    }

    internal class AccumulativeDictionary<TKey> : Dictionary<TKey, int>
    {
        public new void Add(TKey key, int value = 1)
        {
            if (this.ContainsKey(key))
            {
                base[key] += value;
            }
            else
            {
                base.Add(key, value);
            }
        }

        public new int this[TKey key]
        {
            get { return this.ContainsKey(key) ? base[key] : 0; }
            set { this.Add(key, value); }
        }
    }

    public class PriorityQueue<T>
    {
        public PriorityQueue(Comparison<T> comparison = null)
        {
            if (comparison == null)
            {
                if (typeof(T).GetInterfaces().Any(i => i == typeof(IComparable<T>)))
                {
                    m_Comparison = (a, b) => ((IComparable<T>)a).CompareTo(b);
                }
                else
                {
                    throw new ApplicationException("Add comparer");
                }
            }
            else
            {
                m_Comparison = comparison;
            }
        }

        public int Count { get; private set; }

        public void Enqueue(T item)
        {
            m_List.Add(item);
            m_Indexes.Add(item, this.Count);
            this.Count++;
            Up(this.Count);
        }

        public T Peek()
        {
            return m_List[0];
        }

        public T Dequeue()
        {
            if (this.Count > 0)
            {
                var result = m_List[0];

                Swap(0, this.Count - 1);
                m_Indexes.Remove(m_List[this.Count - 1]);
                m_List.RemoveAt(this.Count - 1);
                this.Count--;
                this.Down(1);

                return result;
            }
            throw new ApplicationException("Couldn't get element from empty queue");
        }

        public void Update(T item)
        {
            int index = m_Indexes[item];
            this.Up(index + 1);
        }

        private readonly List<T> m_List = new List<T>();

        private readonly Dictionary<T, int> m_Indexes = new Dictionary<T, int>();

        private readonly Comparison<T> m_Comparison;

        private void Up(int index)
        {
            while (index > 1 && m_Comparison.Invoke(m_List[index - 1], m_List[index / 2 - 1]) > 0)
            {
                this.Swap(index - 1, index / 2 - 1);

                index = index / 2;
            }
        }

        private void Down(int index)
        {
            while (2 * index <= this.Count && m_Comparison.Invoke(m_List[index - 1], m_List[2 * index - 1]) < 0
                   || 2 * index + 1 <= this.Count && m_Comparison.Invoke(m_List[index - 1], m_List[2 * index]) < 0)
            {
                if (2 * index + 1 > this.Count || m_Comparison.Invoke(m_List[2 * index - 1], m_List[2 * index]) > 0)
                {
                    this.Swap(index - 1, 2 * index - 1);
                    index = 2 * index;
                }
                else
                {
                    this.Swap(index - 1, 2 * index);
                    index = 2 * index + 1;
                }
            }
        }

        private void Swap(int i, int j)
        {
            var tmp = m_List[i];
            m_List[i] = m_List[j];
            m_List[j] = tmp;

            m_Indexes[m_List[i]] = i;
            m_Indexes[m_List[j]] = j;
        }
    }

    public class DisjointSetUnion<T>
    {
        public DisjointSetUnion()
        {
            m_Parent = new Dictionary<T, T>();
            m_Rank = new Dictionary<T, int>();
        }

        public DisjointSetUnion(DisjointSetUnion<T> set)
        {
            m_Parent = new Dictionary<T, T>(set.m_Parent);
            m_Rank = new Dictionary<T, int>(set.m_Rank);
        }

        private readonly Dictionary<T, T> m_Parent;

        private readonly Dictionary<T, int> m_Rank;

        public int GetRank(T x)
        {
            return m_Rank[x];
        }

        public void MakeSet(T x)
        {
            m_Parent[x] = x;
            this.m_Rank[x] = 0;
        }

        public void UnionSets(T x, T y)
        {
            x = this.FindSet(x);
            y = this.FindSet(y);
            if (!x.Equals(y))
            {
                if (m_Rank[x] < m_Rank[y])
                {
                    T t = x;
                    x = y;
                    y = t;
                }
                m_Parent[y] = x;
                if (m_Rank[x] == m_Rank[y])
                {
                    m_Rank[x]++;
                }
            }
        }

        public T FindSet(T x)
        {
            if (x.Equals(m_Parent[x]))
            {
                return x;
            }
            return m_Parent[x] = this.FindSet(m_Parent[x]);
        }
    }

    internal class HamiltonianPathFinder
    {
        public static void Run()
        {
            int n, m;
            Reader.Read(out n, out m);
            List<int>[] a = new List<int>[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = new List<int>();
            }
            for (int i = 0; i < m; i++)
            {
                int x, y;
                Reader.Read(out x, out y);
                a[x].Add(y);
                a[y].Add(x);
            }

            var rnd = new Random();

            bool[] v = new bool[n];
            int[] p = new int[n];
            for (int i = 0; i < n; i++)
            {
                p[i] = -1;
            }
            int first = rnd.Next(n);
            int cur = first;
            v[cur] = true;

            int count = 1;

            while (true)
            {
                var unb = a[cur].Where(u => !v[u]).ToList();
                int d = unb.Count;
                if (d > 0)
                {
                    int next = unb[rnd.Next(d)];
                    v[next] = true;
                    p[cur] = next;
                    cur = next;
                    count++;
                }
                else
                {
                    if (count == n && a[cur].Contains(first))
                    {
                        p[cur] = first;
                        break;
                    }

                    d = a[cur].Count;
                    int pivot;
                    do
                    {
                        pivot = a[cur][rnd.Next(d)];
                    }
                    while (p[pivot] == cur);

                    int next = p[pivot];

                    int x = next;
                    int y = -1;
                    while (true)
                    {
                        int tmp = p[x];
                        p[x] = y;
                        y = x;
                        x = tmp;
                        if (y == cur)
                        {
                            break;
                        }
                    }
                    p[pivot] = cur;
                    cur = next;
                }
            }

            cur = first;
            do
            {
                Console.Write("{0} ", cur);
                cur = p[cur];
            }
            while (cur != first);
        }

        public static void WriteTest(int n)
        {
            Console.WriteLine("{0} {1}", 2 * n, 2 * (n - 1) + n);
            for (int i = 0; i < n - 1; i++)
            {
                Console.WriteLine("{0} {1}", 2 * i, 2 * i + 2);
                Console.WriteLine("{0} {1}", 2 * i + 1, 2 * i + 3);
                //Console.WriteLine("{0} {1}", 2 * i + 1, 2 * i + 2);
                //Console.WriteLine("{0} {1}", 2 * i, 2 * i + 3);
            }
            for (int i = 0; i < n; i++)
            {
                Console.WriteLine("{0} {1}", 2 * i, 2 * i + 1);
            }
        }
    }

    internal class Backtrack<T>
        where T : class
    {
        public Backtrack(Func<T, IEnumerable<T>> generator)
        {
            this.m_Generator = generator;
        }

        public Dictionary<T, T> Generate(T startState)
        {
            var result = new Dictionary<T, T>();
            result.Add(startState, null);

            var queue = new Queue<T>();
            queue.Enqueue(startState);

            while (queue.Count > 0)
            {
                var current = queue.Dequeue();
                var next = m_Generator(current);
                foreach (var state in next)
                {
                    if (!result.ContainsKey(state))
                    {
                        result[state] = current;
                        queue.Enqueue(state);
                    }
                }
            }

            return result;
        }

        private Func<T, IEnumerable<T>> m_Generator;
    }

    public static class Utility
    {
        public static readonly int[] sx = new[] { 1, 0, -1, 0 };

        public static readonly int[] sy = new[] { 0, 1, 0, -1 };

        public static PointInt[] GenerateNeighbors(long x, long y)
        {
            var result = new PointInt[4];
            for (int i = 0; i < 4; i++)
            {
                result[i] = new PointInt(x + sx[i], y + sy[i]);
            }
            return result;
        }

        public static PointInt[] GenerateNeighbors(this PointInt p)
        {
            return GenerateNeighbors(p.X, p.Y);
        }

        public static List<PointInt> GenerateNeighborsWithBounds(long x, long y, int n, int m)
        {
            var result = new List<PointInt>(4);
            for (int i = 0; i < 4; i++)
            {
                var nx = x + sx[i];
                var ny = y + sy[i];
                if (0 <= nx && nx < n && 0 <= ny && ny < m)
                {
                    result.Add(new PointInt(nx, ny));
                }
            }
            return result;
        }

        public static List<PointInt> GenerateNeighborsWithBounds(this PointInt p, int n, int m)
        {
            return GenerateNeighborsWithBounds(p.X, p.Y, n, m);
        }

        public static void Swap<T>(ref T x, ref T y)
        {
            T tmp = x;
            x = y;
            y = tmp;
        }
    }

    public static class FFTMultiply
    {
        public static int[] Multiply(int[] a, int[] b)
        {
            var result = Multiply(
                a.Select(x => new Complex(x, 0)).ToArray(), b.Select(x => new Complex(x, 0)).ToArray());
            return result.Select(x => (int)Math.Round(x.Real)).ToArray();
        }

        public static Complex[] Multiply(Complex[] a, Complex[] b)
        {
            var n = 1;
            while (n < Math.Max(a.Length, b.Length))
            {
                n <<= 1;
            }
            n <<= 1;

            var fa = new Complex[n];
            Array.Copy(a, fa, a.Length);
            var fb = new Complex[n];
            Array.Copy(b, fb, b.Length);

            FFT(fa, false);
            FFT(fb, false);

            for (int i = 0; i < n; i++)
            {
                fa[i] *= fb[i];
            }

            FFT(fa, true);
            for (int i = 0; i < n; i++)
            {
                fa[i] /= n;
            }
            return fa;
        }

        private static void FFT(IList<Complex> a, bool invert)
        {
            var n = a.Count;
            if (n == 1)
            {
                return;
            }

            var a0 = new Complex[n / 2];
            var a1 = new Complex[n / 2];
            for (int i = 0; i < n / 2; i++)
            {
                a0[i] = a[2 * i];
                a1[i] = a[2 * i + 1];
            }
            FFT(a0, invert);
            FFT(a1, invert);

            Complex w = 1;
            var ang = 2 * Math.PI / n * (invert ? -1 : 1);
            Complex wn = new Complex(Math.Cos(ang), Math.Sin(ang));

            for (int i = 0; i < n / 2; i++)
            {
                a[i] = a0[i] + w * a1[i];
                a[i + n / 2] = a0[i] - w * a1[i];
                w *= wn;
            }
        }
    }

    internal class Program
    {
        private static StreamReader m_InputStream;

        private static StreamWriter m_OutStream;

        private static void OpenFiles()
        {
            m_InputStream = new StreamReader("input.txt"); //File.OpenText("input.txt");
            Console.SetIn(m_InputStream);

            m_OutStream = new StreamWriter("output.txt"); //File.CreateText("output.txt");
            Console.SetOut(m_OutStream);
        }

        private static void CloseFiles()
        {
            m_OutStream.Flush();

            m_InputStream.Dispose();
            m_OutStream.Dispose();
        }

        private static void Main()
        {
            //Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;

          //  OpenFiles();

            var mainThread = new Thread(() => new Solution().Solve(), 50 * 1024 * 1024);
            mainThread.Start();
            mainThread.Join();

          //  CloseFiles();
        }
    }

    internal class Solution
    {
        public void Solve()
        {
            var max = 1000001;
            int[] a = new int[max];
            int[] b = new int[max];
            int[] xx = new int[8];
            int[] yy = new int[8];
            var ok = true;
            for (int i = 0; i < 8; i++)
            {
                int x, y;
                Reader.Read(out x, out y);
                xx[i] = x;
                yy[i] = y;
                for (int k = 0; k < i; k++)
                {
                    ok &= xx[k] != x || yy[k] != y;
                }
                a[x]++;
                b[y]++;
            }

            int[] c = new[] { 3, 2, 3 };

            int j = 0;
            for (int i = 0; i < max; i++)
            {
                if (a[i] > 0)
                {
                    ok &= a[i] == c[j];
                    j++;
                    if (j > 2)
                    {
                        break;
                    }
                }
            }

            j = 0;
            for (int i = 0; i < max; i++)
            {
                if (b[i] > 0)
                {
                    ok &= b[i] == c[j];
                    j++;
                    if (j > 2)
                    {
                        break;
                    }
                }
            }

            Console.WriteLine(ok ? "respectable" : "ugly");
        }
    }
}

using System;
using System.Collections.Generic;

namespace _334B
{
    class Program
    {
        static void Main(string[] args)
        {
            int[,] Array = new int[10, 2];
            Array[8, 0] = int.MaxValue;
            Array[8, 1] = int.MaxValue;
            Array[9, 0] = -1;
            Array[9, 1] = -1;
            string[] Input;
            for (int i = 0; i < 8; i++)
            {
                Input = Console.ReadLine().Split();
                Array[i, 0] = Convert.ToInt32(Input[0]);
                Array[i, 1] = Convert.ToInt32(Input[1]);
            }

            for (int i = 0; i < 8; i++)
            {
                for (int j = 0; j < 8; j++)
                {
                    if (i != j)
                    {
                        if (Array[i, 0] == Array[j, 0] && Array[j, 1] == Array[i, 1])
                        {
                            Console.WriteLine("ugly");
                            return;
                        }
                    }
                }
            }

            int One = 0;
            int Two = 0;

            for (int i = 0; i < 8; i++)
            {
                int LocalX = 0;
                int LocalY = 0;
                for (int j = 0; j < 8; j++)
                {
                    if (Array[i, 0] == Array[j, 0]) LocalX++;

                    if (Array[i, 1] == Array[j, 1]) LocalY++;
                }

                if (LocalX == 2) One++;
                else if (LocalX == 3) Two++;

                if (LocalY == 2) One++;
                else if (LocalY == 3) Two++;
            }

            if (One == 4 && Two == 12)
            {
                List<int> LeftList = new List<int>() { 8 };
                List<int> DownList = new List<int>() { 8 };
                List<int> RightList = new List<int>() { 9 };
                List<int> UpList = new List<int>() { 9 };

                for (int i = 0; i < 8; i++)
                {
                    if (Array[i, 0] < Array[LeftList[0], 0]) LeftList = new List<int>() { i };
                    else if (Array[i, 0] == Array[LeftList[0], 0]) LeftList.Add(i);

                    if (Array[i, 1] < Array[DownList[0], 1]) DownList = new List<int>() { i };
                    else if (Array[i, 1] == Array[DownList[0], 1]) DownList.Add(i);

                    if (Array[i, 0] > Array[RightList[0], 0]) RightList = new List<int>() { i };
                    else if (Array[i, 0] == Array[RightList[0], 0]) RightList.Add(i);

                    if (Array[i, 1] > Array[UpList[0], 1]) UpList = new List<int>() { i };
                    else if (Array[i, 1] == Array[UpList[0], 1]) UpList.Add(i);
                }

                if (LeftList.Count == 3 && DownList.Count == 3 && RightList.Count == 3 && UpList.Count == 3) Console.WriteLine("respectable");
                else Console.WriteLine("ugly");
            }
            else Console.WriteLine("ugly");
        }
    }
}

#define ONLINE_JUDGE

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

class Program
{

    static int tests = 1;

#if (ONLINE_JUDGE)
    static TextReader r = Console.In;
    static TextWriter w = Console.Out;
#else
    static string path = @"C:\Y\Prog\Codeforces\194\";
    static string answerFile = "0{0}Answer.txt";
    static string resultFile = "0{0}Result.txt";
    static string sourceFile = "0{0}Source.txt";

    static TextReader r;
    static TextWriter w;
#endif

    static void Main(string[] args)
    {
        for (int i = 1; i <= tests; i++)
        {
#if (!ONLINE_JUDGE)
            r = new StreamReader(string.Format(path + sourceFile, i));
            w = new StreamWriter(string.Format(path + resultFile, i), false);
#endif
            int[] x = new int[8];
            int[] y = new int[8];
            for (int j = 0; j < 8; j++)
            {
                string[] buff = r.ReadLine().Split(' ');
                x[j] = Convert.ToInt32(buff[0]);
                y[j] = Convert.ToInt32(buff[1]);
            }
            solve(x,y);
            //w.Flush();
            //w.Dispose();
#if (!ONLINE_JUDGE)
            w.Flush(); w.Close();
            Console.WriteLine("CASE: {0}", i);
            string answer = File.ReadAllText(string.Format(path + answerFile, i));
            string result = File.ReadAllText(string.Format(path + resultFile, i));
            if (answer != result)
            {
                Console.WriteLine("FAIL:");
                Console.WriteLine("Result" + Environment.NewLine + result);
                Console.WriteLine("Answer" + Environment.NewLine + answer);
            }
            else
                Console.WriteLine("OK");
#endif
        }
    }

    public static void solve(int[] x, int[] y)
    {
        int[] xDiff = getDiff(x);
        int[] yDiff = getDiff(y);
        if (xDiff.Length != 3 || yDiff.Length != 3)
        {
            w.WriteLine("ugly");
            return;
        }
        for (int i = 0; i < xDiff.Length; i++)
            for (int j = 0; j < yDiff.Length; j++)
            {
                if (i == 1 && j == 1) continue;
                bool find = false;
                for (int k = 0; k  < x.Length; k ++)
                {
                    if (x[k] == xDiff[i] && y[k] == yDiff[j])
                        find = true;
                }
                if (!find)
                {
                    w.WriteLine("ugly");
                    return;
                }
            }
        w.WriteLine("respectable");

    }

    public static int[] getDiff(int[] x)
    {
        Dictionary<int, int> res = new Dictionary<int, int>();
        List<int> res2 = new List<int>();
        foreach(int i in x)
            if (!res.ContainsKey(i))
            {
                res.Add(i,i);
                res2.Add(i);
            }
        int[] res3 = res2.ToArray();
        Array.Sort(res3);
        return res3;
    }
}

using System;
using System.Linq;

class Scanner
{
    private char[] delimiters = new char[] { ' ' };
    private string[] s;
    private int idx;

    public Scanner()
    {
        s = new string[0];
        idx = 0;
    }

    public string Next()
    {
        if (idx < s.Length)
            return s[idx++];
        idx = 0;
        s = Console.ReadLine().Split(delimiters, StringSplitOptions.RemoveEmptyEntries);
        return s[idx++];
    }

    public int NextInt()
    {
        return int.Parse(Next());
    }

    public long NextLong()
    {
        return long.Parse(Next());
    }
}

class Solution
{
    Scanner cin;
    int n, m, a, b;

    public void Go()
    {
        cin = new Scanner();
        int[] x = new int[8];
        int[] y = new int[8];
        int[] sx = new int[8];
        int[] sy = new int[8];
        for (int i = 0; i < 8; i++) {
            sx[i] = x[i] = cin.NextInt();
            sy[i] = y[i] = cin.NextInt();
        }

        Array.Sort(sx);
        Array.Sort(sy);
        int[] xx = sx.Distinct().ToArray();
        int[] yy = sy.Distinct().ToArray();
        bool okay = false;
        if (xx.Length == 3 && yy.Length == 3) {
            okay = true;
            for (int a = 0; a < 3; a++)
                for (int b = 0; b < 3; b++)
                    if (a != 1 || b != 1) {
                        bool ok = false;
                        for (int i = 0; i < 8; i++)
                            if (x[i] == xx[a] && y[i] == yy[b])
                                ok = true;
                        okay &= ok;
                    }
        }

        if (okay)
            Console.WriteLine("respectable");
        else
            Console.WriteLine("ugly");
    }

    static void Main(string[] args)
    {
        new Solution().Go();
    }
}

using System;
using System.Linq;

namespace _334B
{
	class Program
	{
		static void Main(string[] args)
		{
			int[] x = new int[8];
			int[] y = new int[8];
			for (int i = 0; i < 8; i++)
			{
				int[] ip = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
				x[i] = ip[0];
				y[i] = ip[1];
			}
			int[] xx = x.Distinct().ToArray();
			int[] yy = y.Distinct().ToArray();
			bool b = false;
			if (xx.Length == 3 && yy.Length == 3)
			{
				Array.Sort(xx);
				Array.Sort(yy);
				b = true;
				for (int i = 0; i < 3; i++)
				{
					for (int j = 0; j < 3; j++)
					{
						if (i != 1 || j != 1)
						{
							bool c = false;
							for (int k = 0; k < 8; k++)
							{
								if (x[k] == xx[i] && y[k] == yy[j])
								{
									c = true;
									break;
								}
							}
							b &= c;
						}
						if (b == false)
						{
							break;
						}
					}
					if (b == false)
					{
						break;
					}
				}
			}
			if (b)
			{
				Console.WriteLine("respectable");
			}
			else
			{
				Console.WriteLine("ugly");
			}
		}
	}
}

using System;

namespace EightPointSets
{
    public struct Point
    {
        public int x;
        public int y;
    }

    class EightPointSets
    {
        static void Main(string[] args)
        {
            string[] input;
            Point[] points = new Point[8];

            for (int i = 0; i < 8; i++)
            {
                input = Console.ReadLine().Split();
                points[i].x = int.Parse(input[0]);
                points[i].y = int.Parse(input[1]);
            }

            Point centre;
            bool respectable = false;

            while (true)
            {
                if (points[0].x >= points[3].x || points[3].x >= points[5].x)
                    break;

                if (points[2].x >= points[4].x || points[4].x >= points[7].x)
                    break;

                if (points[0].y >= points[1].y || points[1].y >= points[2].y)
                    break;

                if (points[5].y >= points[6].y || points[6].y >= points[7].y)
                    break;

                centre = GetCentrePoint(points[0], points[2]);

                if (!Equals(centre, points[1]))
                    break;

                centre = GetCentrePoint(points[0], points[5]);

                if (!Equals(centre, points[3]))
                    break;

                centre = GetCentrePoint(points[2], points[7]);

                if (!Equals(centre, points[4]))
                    break;

                centre = GetCentrePoint(points[5], points[7]);

                if (!Equals(centre, points[6]))
                    break;

                Point mainCentre1 = GetCentrePoint(points[1], points[6]);
                Point mainCentre2 = GetCentrePoint(points[3], points[4]);

                if (!Equals(mainCentre1, mainCentre2))
                    break;

                if (points[1].x >= mainCentre1.x || mainCentre1.x >= points[6].x)
                    break;

                if (points[3].y >= mainCentre1.y || mainCentre1.y >= points[4].y)
                    break;

                respectable = true;
                break;
            }

            if (!respectable)
                Console.WriteLine("ugly");
            else
                Console.WriteLine("respectable");
        }

        private static Point GetCentrePoint(Point p1, Point p2)
        {
            Point centre = new Point();

            centre.x = ((p1.x) + (p2.x)) / 2;
            centre.y = ((p1.y) + (p2.y)) / 2;

            return centre;
        }

        private static bool Equals(Point p1, Point p2)
        {
            if (p1.x != p2.x || p1.y != p2.y)
                return false;
            else
                return true;
        }
    }
}

using System;

namespace EightPointSets
{
    public struct Point
    {
        public int x;
        public int y;
    }

    class EightPointSets
    {
        static void Main(string[] args)
        {
            string[] input;
            Point[] points = new Point[8];

            for (int i = 0; i < 8; i++)
            {
                input = Console.ReadLine().Split();
                points[i].x = int.Parse(input[0]);
                points[i].y = int.Parse(input[1]);
            }

            Point centre;
            bool respectable = false;

            while (true)
            {
                centre = GetCentrePoint(points[0], points[2]);

                if (!Equals(centre, points[1]))
                    break;

                centre = GetCentrePoint(points[0], points[5]);

                if (!Equals(centre, points[3]))
                    break;

                centre = GetCentrePoint(points[2], points[7]);

                if (!Equals(centre, points[4]))
                    break;

                centre = GetCentrePoint(points[5], points[7]);

                if (!Equals(centre, points[6]))
                    break;

                Point mainCentre1 = GetCentrePoint(points[1], points[6]);
                Point mainCentre2 = GetCentrePoint(points[3], points[4]);

                if (!Equals(mainCentre1, mainCentre2))
                    break;

                respectable = true;
                break;
            }

            if (!respectable)
                Console.WriteLine("ugly");
            else
                Console.WriteLine("respectable");
        }

        private static Point GetCentrePoint(Point p1, Point p2)
        {
            Point centre = new Point();

            centre.x = ((p1.x) + (p2.x)) / 2;
            centre.y = ((p1.y) + (p2.y)) / 2;

            return centre;
        }

        private static bool Equals(Point p1, Point p2)
        {
            if (p1.x != p2.x || p1.y != p2.y)
                return false;
            else
                return true;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Web;
using System.Net;
using System.Collections;

namespace ConsoleApplication1 {
    class Program {
        static void Main( string[] args ) {
            List<int[]> points = new List<int[]>();
            for ( int i = 0; i < 8; i++ ) {
                points.Add(new int[] { ReadInt(), ReadInt() });
            }

            points = points.OrderBy(( point ) => {
                return point[ 1 ].ToString() + point[ 0 ].ToString();
            }).ToList();

            bool f = points[ 0 ][ 0 ] < points[ 1 ][ 0 ] && points[ 0 ][ 1 ] == points[ 1 ][ 1 ];
            f = f &&
                points[ 1 ][ 0 ] < points[ 2 ][ 0 ] && points[ 0 ][ 1 ] == points[ 2 ][ 1 ];
            f = f &&
                points[ 3 ][ 0 ] == points[ 0 ][ 0 ] && points[ 3 ][ 1 ] > points[ 0 ][ 1 ];
            f = f &&
                points[ 4 ][ 0 ] == points[ 2 ][ 0 ] && points[ 4 ][ 1 ] == points[ 3 ][ 1 ] &&
                points[ 5 ][ 0 ] == points[ 3 ][ 0 ] && points[ 5 ][ 1 ] > points[ 3 ][ 1 ] &&
                points[ 6 ][ 0 ] == points[ 1 ][ 0 ] && points[ 6 ][ 1 ] == points[ 5 ][ 1 ] &&
                points[ 7 ][ 0 ] == points[ 2 ][ 0 ] && points[ 7 ][ 1 ] == points[ 6 ][ 1 ];
            if ( f )
                Console.WriteLine("respectable");
            else
                Console.WriteLine("ugly");
        }

        static int _current = -1;
        static string[] _words = null;
        static int ReadInt() {
            if ( _current == -1 ) {
                _words = Console.ReadLine().Split(new char[] { ' ', '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
                _current = 0;
            }

            int value = int.Parse(_words[ _current ]);
            if ( _current == _words.Length - 1 )
                _current = -1;
            else
                _current++;

            return value;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication4
{
    class Program
    {
        static void Main(string[] args)
        {
            var b = Solve();
            Console.WriteLine(b ? "respectable" : "ugly");
        }

        public static bool Solve()
        {
            var points = new List<Point>();
            for (int i = 0; i < 8; i++)
            {
                var line = Console.ReadLine().Split(' ');
                points.Add(new Point(int.Parse(line[0]), int.Parse(line[1])));
            }

            int maxX = points.Select(p => p.x).Max();
            int minX = points.Select(p => p.x).Min();
            int maxY = points.Select(p => p.y).Max();
            int minY = points.Select(p => p.y).Min();

            int? midX1 = points.Select(p => p.x).Where(x => x < maxX && x > minX).FirstOrDefault();
            int? midY1 = points.Select(p => p.y).Where(y => y < maxY && y > minY).FirstOrDefault();

            if (midX1 == null || midY1 == null) return false;

            int midX = midX1.Value;
            int midY = midY1.Value;

            if (points.Contains(new Point(minX, minY)) &&
                points.Contains(new Point(midX, minY)) &&
                points.Contains(new Point(maxX, minY)) &&
                points.Contains(new Point(minX, midY)) &&
                points.Contains(new Point(maxX, midY)) &&
                points.Contains(new Point(minX, maxY)) &&
                points.Contains(new Point(midX, maxY)) &&
                points.Contains(new Point(maxX, maxY)))
                return true;
            else
                return false;
        }
        struct Point
        {
            public int x;
            public int y;

            public Point(int x, int y)
            {
                this.x = x;
                this.y = y;
            }

            public override bool Equals(object obj)
            {
                var p = (Point)obj;
                return p.x == x && p.y == y;
            }

            public override int GetHashCode()
            {
                return x.GetHashCode() ^ y.GetHashCode();
            }
        }
    }
}

using System;
using System.Linq;
using System.Collections.Generic;
class Demo{
    static void Main() {
        List<int[]> a = Enumerable.Range(0, 8)
            .Select(x => Console.ReadLine()
                .Split().Select(int.Parse)
                .ToArray()).ToList();
        if ((a.Select(x => x[0]).Distinct().Count() == 3
            & a.Select(x => x[1]).Distinct().Count() == 3) && (
            a.Where(x => x[0] == a.Select(e => e[0]).Min())
            .Select(x => x[1]).OrderBy(x => x).ToArray().
            SequenceEqual(
            a.Where(x => x[0] == a.Select(e => e[0]).Max())
            .Select(x => x[1]).OrderBy(x => x).ToArray())))
            Console.WriteLine("respectable");
        else Console.WriteLine("ugly");
    }
}

#define ONLINE_JUDGE

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Linq;

class Program
{

    static int tests = 1;

#if (ONLINE_JUDGE)
    static TextReader r = Console.In;
    static TextWriter w = Console.Out;
#else
    static string path = @"C:\Y\Prog\Codeforces\194\";
    static string answerFile = "0{0}Answer.txt";
    static string resultFile = "0{0}Result.txt";
    static string sourceFile = "0{0}Source.txt";

    static TextReader r;
    static TextWriter w;
#endif

    static void Main(string[] args)
    {

        //int[] t = { 1, 2, 3, 3 };
        //int[] xDistinct = t.Distinct().ToArray();

        for (int i = 1; i <= tests; i++)
        {
#if (!ONLINE_JUDGE)
            r = new StreamReader(string.Format(path + sourceFile, i));
            w = new StreamWriter(string.Format(path + resultFile, i), false);
#endif
            int[] x = new int[8];
            int[] y = new int[8];
            for (int j = 0; j < 8; j++)
            {
                string[] buff = r.ReadLine().Split(' ');
                x[j] = Convert.ToInt32(buff[0]);
                y[j] = Convert.ToInt32(buff[1]);
            }
            solve(x, y);

#if (!ONLINE_JUDGE)
            w.Flush(); w.Close();
            Console.WriteLine("CASE: {0}", i);
            string answer = File.ReadAllText(string.Format(path + answerFile, i));
            string result = File.ReadAllText(string.Format(path + resultFile, i));
            if (answer != result)
            {
                Console.WriteLine("FAIL:");
                Console.WriteLine("Result" + Environment.NewLine + result);
                Console.WriteLine("Answer" + Environment.NewLine + answer);
            }
            else
                Console.WriteLine("OK");
#endif
        }
    }

    public static void solve(int[] x, int[] y)
    {
        int[] xDistinct = x.Distinct().ToArray();
        int[] yDistinct = y.Distinct().ToArray();
        if (xDistinct.Length != 3 || yDistinct.Length != 3)
        {
            w.WriteLine("ugly");
            return;
        }
        for (int i = 0; i < xDistinct.Length; i++)
            for (int j = 0; j < yDistinct.Length; j++)
            {
                if (i == 1 && j == 1) continue;
                bool find = false;
                for (int k = 0; k < x.Length; k++)
                {
                    if (x[k] == xDistinct[i] && y[k] == yDistinct[j])
                        find = true;
                }
                if (!find)
                {
                    w.WriteLine("ugly");
                    return;
                }
            }
        w.WriteLine("respectable");
    }
}

#define ONLINE_JUDGE

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Linq;

class Program
{

    static int tests = 1;

#if (ONLINE_JUDGE)
    static TextReader r = Console.In;
    static TextWriter w = Console.Out;
#else
    static string path = @"C:\Y\Prog\Codeforces\194\";
    static string answerFile = "0{0}Answer.txt";
    static string resultFile = "0{0}Result.txt";
    static string sourceFile = "0{0}Source.txt";

    static TextReader r;
    static TextWriter w;
#endif

    static void Main(string[] args)
    {
        for (int i = 1; i <= tests; i++)
        {
#if (!ONLINE_JUDGE)
            r = new StreamReader(string.Format(path + sourceFile, i));
            w = new StreamWriter(string.Format(path + resultFile, i), false);
#endif
            int[] x = new int[8];
            int[] y = new int[8];
            for (int j = 0; j < 8; j++)
            {
                string[] buff = r.ReadLine().Split(' ');
                x[j] = Convert.ToInt32(buff[0]);
                y[j] = Convert.ToInt32(buff[1]);
            }
            solve(x, y);
            //w.Flush();
            //w.Dispose();
#if (!ONLINE_JUDGE)
            w.Flush(); w.Close();
            Console.WriteLine("CASE: {0}", i);
            string answer = File.ReadAllText(string.Format(path + answerFile, i));
            string result = File.ReadAllText(string.Format(path + resultFile, i));
            if (answer != result)
            {
                Console.WriteLine("FAIL:");
                Console.WriteLine("Result" + Environment.NewLine + result);
                Console.WriteLine("Answer" + Environment.NewLine + answer);
            }
            else
                Console.WriteLine("OK");
#endif
        }
    }

    public static void solve(int[] x, int[] y)
    {
        int[] xDistinct = x.Distinct().ToArray();
        int[] yDistinct = y.Distinct().ToArray();
        if (xDistinct.Length != 3 || yDistinct.Length != 3)
        {
            w.WriteLine("ugly");
            return;
        }
        for (int i = 0; i < xDistinct.Length; i++)
            for (int j = 0; j < yDistinct.Length; j++)
            {
                if (i == 1 && j == 1) continue;
                bool find = false;
                for (int k = 0; k < x.Length; k++)
                {
                    if (x[k] == xDistinct[i] && y[k] == yDistinct[j])
                        find = true;
                }
                if (!find)
                {
                    w.WriteLine("ugly");
                    return;
                }
            }
        w.WriteLine("respectable");
    }
}

using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

class Program
{
    static void Main()
    {
        int xMin = -1, yMin = -1, xMax = -1, yMax = -1;

        var yd = new Dictionary<int, List<int[]>>();
        var xd = new Dictionary<int, List<int[]>>();

        for (int i = 0; i < 8; i++)
        {
            string str = Console.ReadLine();

            int x = int.Parse(str.Split(new char[] { ' ' })[0]);
            int y = int.Parse(str.Split(new char[] { ' ' })[1]);

            if (xMin == -1 || xMin > x) xMin = x;
            if (xMax == -1 || xMax < x) xMax = x;
            if (yMin == -1 || yMin > y) yMin = y;
            if (yMax == -1 || yMax < y) yMax = y;

            if (!xd.ContainsKey(x)) xd.Add(x, new List<int[]>());
            if (!yd.ContainsKey(y)) yd.Add(y, new List<int[]>());

            xd[x].Add(new int[] { x, y });
            yd[y].Add(new int[] { x, y });
        }

        // 0 0, 1 0
        // 0 1,
        // 0 2, 1 2, 2 2

        if (xd.Count != 3 || yd.Count != 3)
        {
            Console.WriteLine("ugly");
            return;
        }

        if (!xd.ContainsKey(xMin) || !xd.ContainsKey(xMax) || xd[xMin].Count != 3 || xd[xMax].Count != 3 ||
            !yd.ContainsKey(yMin) || !yd.ContainsKey(yMax) || yd[yMin].Count != 3 || yd[yMax].Count != 3)
        {
            Console.WriteLine("ugly");
            return;
        }

        Console.WriteLine("respectable");
    }
}

using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

class Program
{
    static void Main()
    {
        int xMin = -1, yMin = 1, xMax = -1, yMax = -1;

        var yd = new Dictionary<int, List<int[]>>();
        var xd = new Dictionary<int, List<int[]>>();

        for (int i = 0; i < 8; i++)
        {
            string str = Console.ReadLine();

            int x = int.Parse(str.Split(new char[] { ' ' })[0]);
            int y = int.Parse(str.Split(new char[] { ' ' })[1]);

            if (xMin == -1 || xMin > x) xMin = x;
            if (xMax == -1 || xMax < x) xMax = x;
            if (yMin == -1 || yMin > y) yMin = y;
            if (yMax == -1 || yMax < y) yMax = y;

            if (!xd.ContainsKey(x)) xd.Add(x, new List<int[]>());
            if (!yd.ContainsKey(y)) yd.Add(y, new List<int[]>());

            xd[x].Add(new int[] { x, y });
            yd[y].Add(new int[] { x, y });
        }

        // 0 0, 1 0
        // 0 1,
        // 0 2, 1 2, 2 2

        if (xd.Count != 3 || yd.Count != 3)
        {
            Console.WriteLine("ugly");
            return;
        }

        if (!xd.ContainsKey(xMin) || !xd.ContainsKey(xMax) || xd[xMin].Count != 3 || xd[xMax].Count != 3 ||
            !yd.ContainsKey(yMin) || !yd.ContainsKey(yMax) || yd[yMin].Count != 3 || yd[yMax].Count != 3)
        {
            Console.WriteLine("ugly");
            return;
        }

        Console.WriteLine("respectable");
    }
}

#define Online

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.IO;
using System.Numerics;

namespace CF
{
    delegate double F(double x);
    delegate decimal Fdec(decimal x);

    partial class Program
    {

        static void Main(string[] args)
        {

#if FileIO
            StreamReader sr = new StreamReader("input.txt");
            StreamWriter sw = new StreamWriter("output.txt");
            Console.SetIn(sr);
            Console.SetOut(sw);
#endif

            B();

#if Online
            Console.ReadLine();
#endif

#if FileIO
            sr.Close();
            sw.Close();
#endif
        }

        static void A()
        {

        }

        static void B()
        {
            int[,] points = new int[8, 2];
            for (int i = 0; i < 8; i++)
            {
                ReadArray(' ');
                points[i, 0] = NextInt();
                points[i, 1] = NextInt();
            }
            int[,] t = new int[3, 3];
            string ans = "";
            for (int i = 0, z = 0; i <= 1000000; i++)
            {
                int cnt = 0;
                for (int j = 0; j < 8; j++)
                {
                    if (points[j, 1] == i)
                    {
                        cnt++;
                    }
                }
                if (cnt == 0) continue;
                if (cnt < 3)
                {
                    if (z != 1 || cnt != 2)
                    {
                        Console.WriteLine("ugly");
                        return;
                    }
                }
                if (cnt > 3)
                {
                    Console.WriteLine("ugly");
                    return;
                }
                for (int j = 0, k = 0; j < 8; j++)
                {
                    if (points[j, 1] == i)
                        t[z, k++] = points[j, 0];
                }
                z++;
            }
            if (t[0, 0] == t[1, 0] && t[1, 0] == t[2, 0] && t[0, 1] == t[2, 1] && t[0, 2] == t[1, 1] && t[1, 1] == t[2, 2])
            {
                ans = "respectable";
            }
            else
            {
                ans = "ugly";
            }
            Console.WriteLine(ans);

        }

        static void C()
        {
            long n = ReadLong();
            long ans = 0;
            if (n == 1)
                ans = 1;
            if (n == 2)
                ans = 1;
            if (n == 3)
                ans = 1;
            if (n > 3)
                ans = n - 2;
            Console.WriteLine(ans);
        }

        static void D()
        {

        }

        static void E()
        {

        }

        static void TestGen()
        {

        }

    }

    public static class MyMath
    {
        public static long BinPow(long a, long n, long mod)
        {
            long res = 1;
            while (n > 0)
            {
                if ((n & 1) == 1)
                {
                    res = (res * a) % mod;
                }
                a = (a * a) % mod;
                n >>= 1;
            }
            return res;
        }

        public static long GCD(long a, long b)
        {
            while (b != 0) b = a % (a = b);
            return a;
        }

        public static int GCD(int a, int b)
        {
            while (b != 0) b = a % (a = b);
            return a;
        }

        public static long LCM(long a, long b)
        {
            return (a * b) / GCD(a, b);
        }

        public static int LCM(int a, int b)
        {
            return (a * b) / GCD(a, b);
        }
    }

    static class ArrayUtils
    {
        public static int BinarySearch(int[] a, int val)
        {
            int left = 0;
            int right = a.Length - 1;
            int mid;

            while (left < right)
            {
                mid = left + ((right - left) >> 1);
                if (val <= a[mid])
                {
                    right = mid;
                }
                else
                {
                    left = mid + 1;
                }
            }

            if (a[left] == val)
                return left;
            else
                return -1;
        }

        public static double Bisection(F f, double left, double right, double eps)
        {
            double mid;
            while (right - left > eps)
            {
                mid = left + ((right - left) / 2d);
                if (Math.Sign(f(mid)) != Math.Sign(f(left)))
                    right = mid;
                else
                    left = mid;
            }
            return (left + right) / 2d;
        }

        public static decimal TernarySearchDec(Fdec f, decimal eps, decimal l, decimal r, bool isMax)
        {
            decimal m1, m2;
            while (r - l > eps)
            {
                m1 = l + (r - l) / 3m;
                m2 = r - (r - l) / 3m;
                if (f(m1) < f(m2))
                    if (isMax)
                        l = m1;
                    else
                        r = m2;
                else
                    if (isMax)
                        r = m2;
                    else
                        l = m1;
            }
            return r;
        }

        public static double TernarySearch(F f, double eps, double l, double r, bool isMax)
        {
            double m1, m2;
            while (r - l > eps)
            {
                m1 = l + (r - l) / 3d;
                m2 = r - (r - l) / 3d;
                if (f(m1) < f(m2))
                    if (isMax)
                        l = m1;
                    else
                        r = m2;
                else
                    if (isMax)
                        r = m2;
                    else
                        l = m1;
            }
            return r;
        }

        public static void Merge<T>(T[] A, int p, int q, int r, T[] L, T[] R, Comparison<T> comp)
        {
            for (int i = p; i <= q; i++)
                L[i] = A[i];
            for (int i = q + 1; i <= r; i++)
                R[i] = A[i];

            for (int k = p, i = p, j = q + 1; k <= r; k++)
            {
                if (i > q)
                {
                    for (; k <= r; k++, j++)
                        A[k] = R[j];
                    return;
                }
                if (j > r)
                {
                    for (; k <= r; k++, i++)
                        A[k] = L[i];
                    return;
                }
                if (comp(L[i], R[j]) <= 0)
                {
                    A[k] = L[i];
                    i++;
                }
                else
                {
                    A[k] = R[j];
                    j++;
                }
            }
        }

        public static void Merge_Sort<T>(T[] A, int p, int r, T[] L, T[] R, Comparison<T> comp)
        {
            if (p >= r) return;
            int q = p + ((r - p) >> 1);
            Merge_Sort(A, p, q, L, R, comp);
            Merge_Sort(A, q + 1, r, L, R, comp);
            Merge(A, p, q, r, L, R, comp);
        }

        public static void Merge<T>(T[] A, int p, int q, int r, T[] L, T[] R) where T : IComparable<T>
        {
            for (int i = p; i <= q; i++)
                L[i] = A[i];
            for (int i = q + 1; i <= r; i++)
                R[i] = A[i];

            for (int k = p, i = p, j = q + 1; k <= r; k++)
            {
                if (i > q)
                {
                    for (; k <= r; k++, j++)
                        A[k] = R[j];
                    return;
                }
                if (j > r)
                {
                    for (; k <= r; k++, i++)
                        A[k] = L[i];
                    return;
                }
                if (L[i].CompareTo(R[j]) >= 0)
                {
                    A[k] = L[i];
                    i++;
                }
                else
                {
                    A[k] = R[j];
                    j++;
                }
            }
        }

        public static void Merge_Sort<T>(T[] A, int p, int r, T[] L, T[] R) where T : IComparable<T>
        {
            if (p >= r) return;
            int q = p + ((r - p) >> 1);
            Merge_Sort(A, p, q, L, R);
            Merge_Sort(A, q + 1, r, L, R);
            Merge(A, p, q, r, L, R);
        }

        public static void Merge_Sort1<T>(T[] A, int p, int r, T[] L, T[] R) where T : IComparable<T>
        {
            int k = 1;
            while (k < r - p + 1)
            {
                int i = 0;
                while (i < r)
                {
                    int _r = Math.Min(i + 2 * k - 1, r);
                    int q = Math.Min(i + k - 1, r);
                    Merge(A, i, q, _r, L, R);
                    i += 2 * k;
                }
                k <<= 1;
            }
        }

        public static void Merge_Sort1<T>(T[] A, int p, int r, T[] L, T[] R, Comparison<T> comp)
        {
            int k = 1;
            while (k < r - p + 1)
            {
                int i = 0;
                while (i < r)
                {
                    int _r = Math.Min(i + 2 * k - 1, r);
                    int q = Math.Min(i + k - 1, r);
                    Merge(A, i, q, _r, L, R, comp);
                    i += 2 * k;
                }
                k <<= 1;
            }
        }

        static void Shake<T>(T[] a)
        {
            Random rnd = new Random(Environment.TickCount);
            T temp;
            int b, c;
            for (int i = 0; i < a.Length; i++)
            {
                b = rnd.Next(0, a.Length);
                c = rnd.Next(0, a.Length);
                temp = a[b];
                a[b] = a[c];
                a[c] = temp;
            }
        }
    }

    partial class Program
    {
        static string[] tokens;
        static int cur_token = 0;

        static void ReadArray(char sep)
        {
            cur_token = 0;
            tokens = Console.ReadLine().Split(sep);
        }

        static int ReadInt()
        {
            return int.Parse(Console.ReadLine());
        }

        static long ReadLong()
        {
            return long.Parse(Console.ReadLine());
        }

        static int NextInt()
        {
            return int.Parse(tokens[cur_token++]);
        }

        static long NextLong()
        {
            return long.Parse(tokens[cur_token++]);
        }

        static double NextDouble()
        {
            return double.Parse(tokens[cur_token++]);
        }

        static decimal NextDecimal()
        {
            return decimal.Parse(tokens[cur_token++]);
        }

        static string NextToken()
        {
            return tokens[cur_token++];
        }

        static string ReadLine()
        {
            return Console.ReadLine();
        }
    }
}

#define Online

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.IO;
using System.Numerics;

namespace CF
{
    delegate double F(double x);
    delegate decimal Fdec(decimal x);

    partial class Program
    {

        static void Main(string[] args)
        {

#if FileIO
            StreamReader sr = new StreamReader("input.txt");
            StreamWriter sw = new StreamWriter("output.txt");
            Console.SetIn(sr);
            Console.SetOut(sw);
#endif

            B();

#if Online
            Console.ReadLine();
#endif

#if FileIO
            sr.Close();
            sw.Close();
#endif
        }

        static void A()
        {

        }

        static void B()
        {
            int[,] points = new int[8, 2];
            for (int i = 0; i < 8; i++)
            {
                ReadArray(' ');
                points[i, 0] = NextInt();
                points[i, 1] = NextInt();
            }
            int[] x = new int[1000001];
            for (int i = 0; i < 8; i++)
                x[points[i, 0]]++;
            int[] next = { 3, 2, 3 };
            for (int i = 0, z = 0; i <= 1000000; i++)
            {
                if (x[i] == 0) continue;
                if (x[i] == next[z])
                {
                    z++;
                }
                else
                {
                    Console.WriteLine("ugly");
                    return;
                }
            }
            int[] y = new int[1000001];
            for (int i = 0, k = 0; i <= 1000000 && k < 3; i++)
            {
                if (x[i] == next[k])
                {
                    for (int j = 0; j <= 1000000; j++)
                    {
                        for (int z = 0; z < 8; z++)
                        {
                            if (points[z, 1] == j && points[z, 0] == i)
                            {
                                y[j]++;
                                break;
                            }
                        }
                    }
                    k++;
                }
            }
            for (int i = 0, k = 0; i <= 1000000 && k < 3; i++)
            {
                if (y[i] == 0) continue;
                if (y[i] == next[k])
                {
                    k++;
                }
                else
                {
                    Console.WriteLine("ugly");
                    return;
                }
            }
            List<int> t = new List<int>();
            for (int i = 0, z = 0; i <= 1000000; i++)
            {
                if (y[i] == 3 && z == 0)
                {
                    for (int j = 0; j < 8; j++)
                        if (points[j, 1] == i)
                            t.Add(points[j, 0]);
                    z++;
                }
                if (y[i] == 2)
                {
                    for (int j = 0, k = 0; j < 8; j++)
                        if (points[j, 1] == i)
                            t.Add(points[j, 0]);
                    if (t[3] != t[0] || t[4] != t[2])
                    {
                        Console.WriteLine("ugly");
                        return;
                    }
                    z++;
                }
                if (y[i] == 3 && z == 2)
                {
                    for (int j = 0, k = 0; j < 8; j++)
                        if (points[j, 1] == i)
                            t.Add(points[j, 0]);
                    for (int j = 0; j < 3; j++)
                    {
                        if (t[j] != t[5 + j])
                        {
                            Console.WriteLine("ugly");
                            return;
                        }
                    }

                }
            }
            Console.WriteLine("respectable");

        }

        static void C()
        {
            long n = ReadLong();
            long ans = 0;
            if (n == 1)
                ans = 1;
            if (n == 2)
                ans = 1;
            if (n == 3)
                ans = 1;
            if (n > 3)
                ans = n - 2;
            Console.WriteLine(ans);
        }

        static void D()
        {

        }

        static void E()
        {

        }

        static void TestGen()
        {

        }

    }

    public static class MyMath
    {
        public static long BinPow(long a, long n, long mod)
        {
            long res = 1;
            while (n > 0)
            {
                if ((n & 1) == 1)
                {
                    res = (res * a) % mod;
                }
                a = (a * a) % mod;
                n >>= 1;
            }
            return res;
        }

        public static long GCD(long a, long b)
        {
            while (b != 0) b = a % (a = b);
            return a;
        }

        public static int GCD(int a, int b)
        {
            while (b != 0) b = a % (a = b);
            return a;
        }

        public static long LCM(long a, long b)
        {
            return (a * b) / GCD(a, b);
        }

        public static int LCM(int a, int b)
        {
            return (a * b) / GCD(a, b);
        }
    }

    static class ArrayUtils
    {
        public static int BinarySearch(int[] a, int val)
        {
            int left = 0;
            int right = a.Length - 1;
            int mid;

            while (left < right)
            {
                mid = left + ((right - left) >> 1);
                if (val <= a[mid])
                {
                    right = mid;
                }
                else
                {
                    left = mid + 1;
                }
            }

            if (a[left] == val)
                return left;
            else
                return -1;
        }

        public static double Bisection(F f, double left, double right, double eps)
        {
            double mid;
            while (right - left > eps)
            {
                mid = left + ((right - left) / 2d);
                if (Math.Sign(f(mid)) != Math.Sign(f(left)))
                    right = mid;
                else
                    left = mid;
            }
            return (left + right) / 2d;
        }

        public static decimal TernarySearchDec(Fdec f, decimal eps, decimal l, decimal r, bool isMax)
        {
            decimal m1, m2;
            while (r - l > eps)
            {
                m1 = l + (r - l) / 3m;
                m2 = r - (r - l) / 3m;
                if (f(m1) < f(m2))
                    if (isMax)
                        l = m1;
                    else
                        r = m2;
                else
                    if (isMax)
                        r = m2;
                    else
                        l = m1;
            }
            return r;
        }

        public static double TernarySearch(F f, double eps, double l, double r, bool isMax)
        {
            double m1, m2;
            while (r - l > eps)
            {
                m1 = l + (r - l) / 3d;
                m2 = r - (r - l) / 3d;
                if (f(m1) < f(m2))
                    if (isMax)
                        l = m1;
                    else
                        r = m2;
                else
                    if (isMax)
                        r = m2;
                    else
                        l = m1;
            }
            return r;
        }

        public static void Merge<T>(T[] A, int p, int q, int r, T[] L, T[] R, Comparison<T> comp)
        {
            for (int i = p; i <= q; i++)
                L[i] = A[i];
            for (int i = q + 1; i <= r; i++)
                R[i] = A[i];

            for (int k = p, i = p, j = q + 1; k <= r; k++)
            {
                if (i > q)
                {
                    for (; k <= r; k++, j++)
                        A[k] = R[j];
                    return;
                }
                if (j > r)
                {
                    for (; k <= r; k++, i++)
                        A[k] = L[i];
                    return;
                }
                if (comp(L[i], R[j]) <= 0)
                {
                    A[k] = L[i];
                    i++;
                }
                else
                {
                    A[k] = R[j];
                    j++;
                }
            }
        }

        public static void Merge_Sort<T>(T[] A, int p, int r, T[] L, T[] R, Comparison<T> comp)
        {
            if (p >= r) return;
            int q = p + ((r - p) >> 1);
            Merge_Sort(A, p, q, L, R, comp);
            Merge_Sort(A, q + 1, r, L, R, comp);
            Merge(A, p, q, r, L, R, comp);
        }

        public static void Merge<T>(T[] A, int p, int q, int r, T[] L, T[] R) where T : IComparable<T>
        {
            for (int i = p; i <= q; i++)
                L[i] = A[i];
            for (int i = q + 1; i <= r; i++)
                R[i] = A[i];

            for (int k = p, i = p, j = q + 1; k <= r; k++)
            {
                if (i > q)
                {
                    for (; k <= r; k++, j++)
                        A[k] = R[j];
                    return;
                }
                if (j > r)
                {
                    for (; k <= r; k++, i++)
                        A[k] = L[i];
                    return;
                }
                if (L[i].CompareTo(R[j]) >= 0)
                {
                    A[k] = L[i];
                    i++;
                }
                else
                {
                    A[k] = R[j];
                    j++;
                }
            }
        }

        public static void Merge_Sort<T>(T[] A, int p, int r, T[] L, T[] R) where T : IComparable<T>
        {
            if (p >= r) return;
            int q = p + ((r - p) >> 1);
            Merge_Sort(A, p, q, L, R);
            Merge_Sort(A, q + 1, r, L, R);
            Merge(A, p, q, r, L, R);
        }

        public static void Merge_Sort1<T>(T[] A, int p, int r, T[] L, T[] R) where T : IComparable<T>
        {
            int k = 1;
            while (k < r - p + 1)
            {
                int i = 0;
                while (i < r)
                {
                    int _r = Math.Min(i + 2 * k - 1, r);
                    int q = Math.Min(i + k - 1, r);
                    Merge(A, i, q, _r, L, R);
                    i += 2 * k;
                }
                k <<= 1;
            }
        }

        public static void Merge_Sort1<T>(T[] A, int p, int r, T[] L, T[] R, Comparison<T> comp)
        {
            int k = 1;
            while (k < r - p + 1)
            {
                int i = 0;
                while (i < r)
                {
                    int _r = Math.Min(i + 2 * k - 1, r);
                    int q = Math.Min(i + k - 1, r);
                    Merge(A, i, q, _r, L, R, comp);
                    i += 2 * k;
                }
                k <<= 1;
            }
        }

        static void Shake<T>(T[] a)
        {
            Random rnd = new Random(Environment.TickCount);
            T temp;
            int b, c;
            for (int i = 0; i < a.Length; i++)
            {
                b = rnd.Next(0, a.Length);
                c = rnd.Next(0, a.Length);
                temp = a[b];
                a[b] = a[c];
                a[c] = temp;
            }
        }
    }

    partial class Program
    {
        static string[] tokens;
        static int cur_token = 0;

        static void ReadArray(char sep)
        {
            cur_token = 0;
            tokens = Console.ReadLine().Split(sep);
        }

        static int ReadInt()
        {
            return int.Parse(Console.ReadLine());
        }

        static long ReadLong()
        {
            return long.Parse(Console.ReadLine());
        }

        static int NextInt()
        {
            return int.Parse(tokens[cur_token++]);
        }

        static long NextLong()
        {
            return long.Parse(tokens[cur_token++]);
        }

        static double NextDouble()
        {
            return double.Parse(tokens[cur_token++]);
        }

        static decimal NextDecimal()
        {
            return decimal.Parse(tokens[cur_token++]);
        }

        static string NextToken()
        {
            return tokens[cur_token++];
        }

        static string ReadLine()
        {
            return Console.ReadLine();
        }
    }
}

#define Online

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.IO;
using System.Numerics;

namespace CF
{
    delegate double F(double x);
    delegate decimal Fdec(decimal x);

    partial class Program
    {

        static void Main(string[] args)
        {

#if FileIO
            StreamReader sr = new StreamReader("input.txt");
            StreamWriter sw = new StreamWriter("output.txt");
            Console.SetIn(sr);
            Console.SetOut(sw);
#endif

            B();

#if Online
            Console.ReadLine();
#endif

#if FileIO
            sr.Close();
            sw.Close();
#endif
        }

        static void A()
        {

        }

        static void B()
        {
            int[,] points = new int[8, 2];
            for (int i = 0; i < 8; i++)
            {
                ReadArray(' ');
                points[i, 0] = NextInt();
                points[i, 1] = NextInt();
            }
            int[] next = new int[3];
            next[0] = next[2] = 3;
            next[1] = 2;
            int[,] a = new int[3, 3];
            for (int i = 0; i < 3; i++)
                for (int j = 0; j < 3; j++)
                    a[i, j] = -1;
            int[] c = new int[3];
            for (int i = 0, k = 0; i <= 1000000 && k < 3; i++)
            {
                for (int j = 0, z = 0; j < 8; j++)
                {
                    if (points[j, 0] == i)
                    {
                        if (z < 3) a[k, z++] = points[j, 1];
                        c[k]++;
                    }
                }
                if (c[k] == next[k])
                {
                    k++;
                }
                else
                {
                    if (c[k] == 0)
                    {
                        continue;
                    }
                    else
                    {
                        Console.WriteLine("ugly");
                        return;
                    }
                }
            }

            int[] y = new int[1000001];
            for (int i = 0; i < 3; i++)
                for (int j = 0; j < 3; j++)
                    if (a[i, j] != -1)
                        y[a[i, j]]++;
            int p = 0;
            for (int i = 0; i <= 1000000 && p < 3; i++)
            {
                if (y[i] == next[p])
                {
                    p++;
                }
            }
            if (p == 3)
            {
                Console.WriteLine("respectable");
            }
            else
            {
                Console.WriteLine("ugly");
            }
        }

        static void C()
        {
            long n = ReadLong();
            long ans = 0;
            if (n == 1)
                ans = 1;
            if (n == 2)
                ans = 1;
            if (n == 3)
                ans = 1;
            if (n > 3)
                ans = n - 2;
            Console.WriteLine(ans);
        }

        static void D()
        {

        }

        static void E()
        {

        }

        static void TestGen()
        {

        }

    }

    public static class MyMath
    {
        public static long BinPow(long a, long n, long mod)
        {
            long res = 1;
            while (n > 0)
            {
                if ((n & 1) == 1)
                {
                    res = (res * a) % mod;
                }
                a = (a * a) % mod;
                n >>= 1;
            }
            return res;
        }

        public static long GCD(long a, long b)
        {
            while (b != 0) b = a % (a = b);
            return a;
        }

        public static int GCD(int a, int b)
        {
            while (b != 0) b = a % (a = b);
            return a;
        }

        public static long LCM(long a, long b)
        {
            return (a * b) / GCD(a, b);
        }

        public static int LCM(int a, int b)
        {
            return (a * b) / GCD(a, b);
        }
    }

    static class ArrayUtils
    {
        public static int BinarySearch(int[] a, int val)
        {
            int left = 0;
            int right = a.Length - 1;
            int mid;

            while (left < right)
            {
                mid = left + ((right - left) >> 1);
                if (val <= a[mid])
                {
                    right = mid;
                }
                else
                {
                    left = mid + 1;
                }
            }

            if (a[left] == val)
                return left;
            else
                return -1;
        }

        public static double Bisection(F f, double left, double right, double eps)
        {
            double mid;
            while (right - left > eps)
            {
                mid = left + ((right - left) / 2d);
                if (Math.Sign(f(mid)) != Math.Sign(f(left)))
                    right = mid;
                else
                    left = mid;
            }
            return (left + right) / 2d;
        }

        public static decimal TernarySearchDec(Fdec f, decimal eps, decimal l, decimal r, bool isMax)
        {
            decimal m1, m2;
            while (r - l > eps)
            {
                m1 = l + (r - l) / 3m;
                m2 = r - (r - l) / 3m;
                if (f(m1) < f(m2))
                    if (isMax)
                        l = m1;
                    else
                        r = m2;
                else
                    if (isMax)
                        r = m2;
                    else
                        l = m1;
            }
            return r;
        }

        public static double TernarySearch(F f, double eps, double l, double r, bool isMax)
        {
            double m1, m2;
            while (r - l > eps)
            {
                m1 = l + (r - l) / 3d;
                m2 = r - (r - l) / 3d;
                if (f(m1) < f(m2))
                    if (isMax)
                        l = m1;
                    else
                        r = m2;
                else
                    if (isMax)
                        r = m2;
                    else
                        l = m1;
            }
            return r;
        }

        public static void Merge<T>(T[] A, int p, int q, int r, T[] L, T[] R, Comparison<T> comp)
        {
            for (int i = p; i <= q; i++)
                L[i] = A[i];
            for (int i = q + 1; i <= r; i++)
                R[i] = A[i];

            for (int k = p, i = p, j = q + 1; k <= r; k++)
            {
                if (i > q)
                {
                    for (; k <= r; k++, j++)
                        A[k] = R[j];
                    return;
                }
                if (j > r)
                {
                    for (; k <= r; k++, i++)
                        A[k] = L[i];
                    return;
                }
                if (comp(L[i], R[j]) <= 0)
                {
                    A[k] = L[i];
                    i++;
                }
                else
                {
                    A[k] = R[j];
                    j++;
                }
            }
        }

        public static void Merge_Sort<T>(T[] A, int p, int r, T[] L, T[] R, Comparison<T> comp)
        {
            if (p >= r) return;
            int q = p + ((r - p) >> 1);
            Merge_Sort(A, p, q, L, R, comp);
            Merge_Sort(A, q + 1, r, L, R, comp);
            Merge(A, p, q, r, L, R, comp);
        }

        public static void Merge<T>(T[] A, int p, int q, int r, T[] L, T[] R) where T : IComparable<T>
        {
            for (int i = p; i <= q; i++)
                L[i] = A[i];
            for (int i = q + 1; i <= r; i++)
                R[i] = A[i];

            for (int k = p, i = p, j = q + 1; k <= r; k++)
            {
                if (i > q)
                {
                    for (; k <= r; k++, j++)
                        A[k] = R[j];
                    return;
                }
                if (j > r)
                {
                    for (; k <= r; k++, i++)
                        A[k] = L[i];
                    return;
                }
                if (L[i].CompareTo(R[j]) >= 0)
                {
                    A[k] = L[i];
                    i++;
                }
                else
                {
                    A[k] = R[j];
                    j++;
                }
            }
        }

        public static void Merge_Sort<T>(T[] A, int p, int r, T[] L, T[] R) where T : IComparable<T>
        {
            if (p >= r) return;
            int q = p + ((r - p) >> 1);
            Merge_Sort(A, p, q, L, R);
            Merge_Sort(A, q + 1, r, L, R);
            Merge(A, p, q, r, L, R);
        }

        public static void Merge_Sort1<T>(T[] A, int p, int r, T[] L, T[] R) where T : IComparable<T>
        {
            int k = 1;
            while (k < r - p + 1)
            {
                int i = 0;
                while (i < r)
                {
                    int _r = Math.Min(i + 2 * k - 1, r);
                    int q = Math.Min(i + k - 1, r);
                    Merge(A, i, q, _r, L, R);
                    i += 2 * k;
                }
                k <<= 1;
            }
        }

        public static void Merge_Sort1<T>(T[] A, int p, int r, T[] L, T[] R, Comparison<T> comp)
        {
            int k = 1;
            while (k < r - p + 1)
            {
                int i = 0;
                while (i < r)
                {
                    int _r = Math.Min(i + 2 * k - 1, r);
                    int q = Math.Min(i + k - 1, r);
                    Merge(A, i, q, _r, L, R, comp);
                    i += 2 * k;
                }
                k <<= 1;
            }
        }

        static void Shake<T>(T[] a)
        {
            Random rnd = new Random(Environment.TickCount);
            T temp;
            int b, c;
            for (int i = 0; i < a.Length; i++)
            {
                b = rnd.Next(0, a.Length);
                c = rnd.Next(0, a.Length);
                temp = a[b];
                a[b] = a[c];
                a[c] = temp;
            }
        }
    }

    partial class Program
    {
        static string[] tokens;
        static int cur_token = 0;

        static void ReadArray(char sep)
        {
            cur_token = 0;
            tokens = Console.ReadLine().Split(sep);
        }

        static int ReadInt()
        {
            return int.Parse(Console.ReadLine());
        }

        static long ReadLong()
        {
            return long.Parse(Console.ReadLine());
        }

        static int NextInt()
        {
            return int.Parse(tokens[cur_token++]);
        }

        static long NextLong()
        {
            return long.Parse(tokens[cur_token++]);
        }

        static double NextDouble()
        {
            return double.Parse(tokens[cur_token++]);
        }

        static decimal NextDecimal()
        {
            return decimal.Parse(tokens[cur_token++]);
        }

        static string NextToken()
        {
            return tokens[cur_token++];
        }

        static string ReadLine()
        {
            return Console.ReadLine();
        }
    }
}

#define Online

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.IO;
using System.Numerics;

namespace CF
{
    delegate double F(double x);
    delegate decimal Fdec(decimal x);

    partial class Program
    {

        static void Main(string[] args)
        {

#if FileIO
            StreamReader sr = new StreamReader("input.txt");
            StreamWriter sw = new StreamWriter("output.txt");
            Console.SetIn(sr);
            Console.SetOut(sw);
#endif

            B();

#if Online
            Console.ReadLine();
#endif

#if FileIO
            sr.Close();
            sw.Close();
#endif
        }

        static void A()
        {
            int n = ReadInt();
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < n; i++)
            {
                for (int j = i * (n / 2), z = 0; z < n / 2; z++, j++)
                {
                    sb.Append((j + 1) + " ");
                }
                for (int j = n * n - i * (n / 2), z = 0; z < n / 2; z++, j--)
                {
                    sb.Append((j) + " ");
                }
                sb.AppendLine("");
            }
            Console.Write(sb);
        }

        static void B()
        {
            int[] x = new int[10000001];
            int[] y = new int[10000001];
            int[,] points = new int[8, 2];
            for (int i = 0; i < 8; i++)
            {
                ReadArray(' ');
                int _x = NextInt();
                int _y = NextInt();
                y[_y]++;
                points[i, 0] = _x;
                points[i, 1] = _y;
            }
            int cnttwo = 0;
            int cntthree = 0;
            for (int i = 0; i < y.Length; i++)
            {
                if (y[i] == 3)
                    cntthree++;
                if (y[i] == 2)
                    cnttwo++;
            }
            if (cntthree != 2 || cnttwo != 1)
            {
                Console.WriteLine("ugly");
                return;
            }
            int dif = 0;
            int min_x = int.MaxValue;
            int max_x = int.MinValue;
            for (int i = 0; i < 8; i++)
            {
                if (min_x > points[i, 0])
                    min_x = points[i, 0];
                if (max_x < points[i, 0])
                    max_x = points[i, 0];
            }
            dif = max_x - min_x;
            for (int i = 0, z = 0; i < y.Length; i++)
            {
                if (y[i] == 3 && z == 0)
                {
                    int cnt = 0;
                    for (int j = 0; j < 8; j++)
                    {
                        if (points[j, 1] == i && x[points[j, 0]] == z)
                        {
                            cnt++;
                            x[points[j, 0]]++;
                        }
                    }
                    if (cnt != 3)
                    {
                        Console.WriteLine("ugly");
                        return;
                    }
                    z++;
                }
                if (y[i] == 2)
                {
                    if (z != 1)
                    {
                        Console.WriteLine("ugly");
                        return;
                    }
                    min_x = int.MaxValue;
                    max_x = int.MinValue;
                    int cnt = 0;
                    for (int j = 0; j < 8; j++)
                    {
                        if (points[j, 1] == i && x[points[j, 0]] == z)
                        {
                            min_x = Math.Min(min_x, points[j, 0]);
                            max_x = Math.Max(max_x, points[j, 0]);
                            x[points[j, 0]]++;
                            cnt++;
                        }
                    }
                    if (cnt != 2)
                    {
                        Console.WriteLine("ugly");
                        return;
                    }
                    if (max_x - min_x != dif)
                    {
                        Console.WriteLine("ugly");
                        return;
                    }
                    z++;
                }
                if (y[i] == 3 && z == 2)
                {
                    int cnt = 0;
                    int cntone = 0;
                    for (int j = 0; j < 8; j++)
                    {
                        if (points[j, 1] == i && (x[points[j, 0]] == z || x[points[j, 0]] == 1))
                        {
                            cnt++;
                            x[points[j, 0]]++;
                        }
                    }
                    if (cnt != 3)
                    {
                        Console.WriteLine("ugly");
                        return;
                    }
                    z++;
                }
            }
            Console.WriteLine("respectable");
        }

        static void C()
        {

        }

        static void D()
        {

        }

        static void E()
        {

        }

        static void TestGen()
        {

        }

    }

    public static class MyMath
    {
        public static long BinPow(long a, long n, long mod)
        {
            long res = 1;
            while (n > 0)
            {
                if ((n & 1) == 1)
                {
                    res = (res * a) % mod;
                }
                a = (a * a) % mod;
                n >>= 1;
            }
            return res;
        }

        public static long GCD(long a, long b)
        {
            while (b != 0) b = a % (a = b);
            return a;
        }

        public static int GCD(int a, int b)
        {
            while (b != 0) b = a % (a = b);
            return a;
        }

        public static long LCM(long a, long b)
        {
            return (a * b) / GCD(a, b);
        }

        public static int LCM(int a, int b)
        {
            return (a * b) / GCD(a, b);
        }
    }

    static class ArrayUtils
    {
        public static int BinarySearch(int[] a, int val)
        {
            int left = 0;
            int right = a.Length - 1;
            int mid;

            while (left < right)
            {
                mid = left + ((right - left) >> 1);
                if (val <= a[mid])
                {
                    right = mid;
                }
                else
                {
                    left = mid + 1;
                }
            }

            if (a[left] == val)
                return left;
            else
                return -1;
        }

        public static double Bisection(F f, double left, double right, double eps)
        {
            double mid;
            while (right - left > eps)
            {
                mid = left + ((right - left) / 2d);
                if (Math.Sign(f(mid)) != Math.Sign(f(left)))
                    right = mid;
                else
                    left = mid;
            }
            return (left + right) / 2d;
        }

        public static decimal TernarySearchDec(Fdec f, decimal eps, decimal l, decimal r, bool isMax)
        {
            decimal m1, m2;
            while (r - l > eps)
            {
                m1 = l + (r - l) / 3m;
                m2 = r - (r - l) / 3m;
                if (f(m1) < f(m2))
                    if (isMax)
                        l = m1;
                    else
                        r = m2;
                else
                    if (isMax)
                        r = m2;
                    else
                        l = m1;
            }
            return r;
        }

        public static double TernarySearch(F f, double eps, double l, double r, bool isMax)
        {
            double m1, m2;
            while (r - l > eps)
            {
                m1 = l + (r - l) / 3d;
                m2 = r - (r - l) / 3d;
                if (f(m1) < f(m2))
                    if (isMax)
                        l = m1;
                    else
                        r = m2;
                else
                    if (isMax)
                        r = m2;
                    else
                        l = m1;
            }
            return r;
        }

        public static void Merge<T>(T[] A, int p, int q, int r, T[] L, T[] R, Comparison<T> comp)
        {
            for (int i = p; i <= q; i++)
                L[i] = A[i];
            for (int i = q + 1; i <= r; i++)
                R[i] = A[i];

            for (int k = p, i = p, j = q + 1; k <= r; k++)
            {
                if (i > q)
                {
                    for (; k <= r; k++, j++)
                        A[k] = R[j];
                    return;
                }
                if (j > r)
                {
                    for (; k <= r; k++, i++)
                        A[k] = L[i];
                    return;
                }
                if (comp(L[i], R[j]) <= 0)
                {
                    A[k] = L[i];
                    i++;
                }
                else
                {
                    A[k] = R[j];
                    j++;
                }
            }
        }

        public static void Merge_Sort<T>(T[] A, int p, int r, T[] L, T[] R, Comparison<T> comp)
        {
            if (p >= r) return;
            int q = p + ((r - p) >> 1);
            Merge_Sort(A, p, q, L, R, comp);
            Merge_Sort(A, q + 1, r, L, R, comp);
            Merge(A, p, q, r, L, R, comp);
        }

        public static void Merge<T>(T[] A, int p, int q, int r, T[] L, T[] R) where T : IComparable<T>
        {
            for (int i = p; i <= q; i++)
                L[i] = A[i];
            for (int i = q + 1; i <= r; i++)
                R[i] = A[i];

            for (int k = p, i = p, j = q + 1; k <= r; k++)
            {
                if (i > q)
                {
                    for (; k <= r; k++, j++)
                        A[k] = R[j];
                    return;
                }
                if (j > r)
                {
                    for (; k <= r; k++, i++)
                        A[k] = L[i];
                    return;
                }
                if (L[i].CompareTo(R[j]) >= 0)
                {
                    A[k] = L[i];
                    i++;
                }
                else
                {
                    A[k] = R[j];
                    j++;
                }
            }
        }

        public static void Merge_Sort<T>(T[] A, int p, int r, T[] L, T[] R) where T : IComparable<T>
        {
            if (p >= r) return;
            int q = p + ((r - p) >> 1);
            Merge_Sort(A, p, q, L, R);
            Merge_Sort(A, q + 1, r, L, R);
            Merge(A, p, q, r, L, R);
        }

        public static void Merge_Sort1<T>(T[] A, int p, int r, T[] L, T[] R) where T : IComparable<T>
        {
            int k = 1;
            while (k < r - p + 1)
            {
                int i = 0;
                while (i < r)
                {
                    int _r = Math.Min(i + 2 * k - 1, r);
                    int q = Math.Min(i + k - 1, r);
                    Merge(A, i, q, _r, L, R);
                    i += 2 * k;
                }
                k <<= 1;
            }
        }

        public static void Merge_Sort1<T>(T[] A, int p, int r, T[] L, T[] R, Comparison<T> comp)
        {
            int k = 1;
            while (k < r - p + 1)
            {
                int i = 0;
                while (i < r)
                {
                    int _r = Math.Min(i + 2 * k - 1, r);
                    int q = Math.Min(i + k - 1, r);
                    Merge(A, i, q, _r, L, R, comp);
                    i += 2 * k;
                }
                k <<= 1;
            }
        }

        static void Shake<T>(T[] a)
        {
            Random rnd = new Random(Environment.TickCount);
            T temp;
            int b, c;
            for (int i = 0; i < a.Length; i++)
            {
                b = rnd.Next(0, a.Length);
                c = rnd.Next(0, a.Length);
                temp = a[b];
                a[b] = a[c];
                a[c] = temp;
            }
        }
    }

    partial class Program
    {
        static string[] tokens;
        static int cur_token = 0;

        static void ReadArray(char sep)
        {
            cur_token = 0;
            tokens = Console.ReadLine().Split(sep);
        }

        static int ReadInt()
        {
            return int.Parse(Console.ReadLine());
        }

        static long ReadLong()
        {
            return long.Parse(Console.ReadLine());
        }

        static int NextInt()
        {
            return int.Parse(tokens[cur_token++]);
        }

        static long NextLong()
        {
            return long.Parse(tokens[cur_token++]);
        }

        static double NextDouble()
        {
            return double.Parse(tokens[cur_token++]);
        }

        static decimal NextDecimal()
        {
            return decimal.Parse(tokens[cur_token++]);
        }

        static string NextToken()
        {
            return tokens[cur_token++];
        }

        static string ReadLine()
        {
            return Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _334B_Eight_Points_Set
{
    class Point
    {
        public int X;
        public int Y;
    }

    class Program
    {
        static void Main(string[] args)
        {
            Point[] points = new Point[8];
            for (int i = 0; i < 8; i++)
            {
                var input = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
                points[i] = new Point() {X = input[0], Y = input[1]};
            }

            if (points[0].X == points[1].X && points[1].X == points[2].X &&
                points[3].X == points[4].X &&
                points[5].X == points[6].X && points[6].X == points[7].X &&

                points[0].Y == points[3].Y && points[3].Y == points[5].Y &&
                points[1].Y == points[6].Y &&
                points[2].Y == points[4].Y && points[4].Y == points[7].Y)
            {
                Console.WriteLine("respectable");
            }
            else
            {
                Console.WriteLine("ugly");
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Threading;

namespace Temp
{
    public class PointInt
    {
        public long X;

        public long Y;

        public PointInt(long x, long y)
        {
            this.X = x;
            this.Y = y;
        }

        public PointInt(PointInt head)
            : this(head.X, head.Y)
        {
        }

        public static PointInt operator +(PointInt a, PointInt b)
        {
            return new PointInt(a.X + b.X, a.Y + b.Y);
        }

        public static PointInt operator -(PointInt a, PointInt b)
        {
            return new PointInt(a.X - b.X, a.Y - b.Y);
        }

        public static PointInt operator *(PointInt a, long k)
        {
            return new PointInt(k * a.X, k * a.Y);
        }

        public static PointInt operator *(long k, PointInt a)
        {
            return new PointInt(k * a.X, k * a.Y);
        }

        public bool IsInsideRectangle(long l, long b, long r, long t)
        {
            return (l <= X) && (X <= r) && (b <= Y) && (Y <= t);
        }

        public bool Equals(PointInt other)
        {
            if (ReferenceEquals(null, other))
            {
                return false;
            }
            if (ReferenceEquals(this, other))
            {
                return true;
            }
            return other.X == this.X && other.Y == this.Y;
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj))
            {
                return false;
            }
            if (ReferenceEquals(this, obj))
            {
                return true;
            }
            if (obj.GetType() != typeof(PointInt))
            {
                return false;
            }
            return Equals((PointInt)obj);
        }

        public override int GetHashCode()
        {
            unchecked
            {
                return (this.X.GetHashCode() * 397) ^ this.Y.GetHashCode();
            }
        }
    }

    public class Point2DReal
    {
        public double X;

        public double Y;

        public Point2DReal(double x, double y)
        {
            this.X = x;
            this.Y = y;
        }

        public Point2DReal(Point2DReal head)
            : this(head.X, head.Y)
        {
        }

        public static Point2DReal operator +(Point2DReal a, Point2DReal b)
        {
            return new Point2DReal(a.X + b.X, a.Y + b.Y);
        }

        public static Point2DReal operator -(Point2DReal a, Point2DReal b)
        {
            return new Point2DReal(a.X - b.X, a.Y - b.Y);
        }

        public static Point2DReal operator *(Point2DReal a, double k)
        {
            return new Point2DReal(k * a.X, k * a.Y);
        }

        public static Point2DReal operator *(double k, Point2DReal a)
        {
            return new Point2DReal(k * a.X, k * a.Y);
        }

        public double Dist(Point2DReal p)
        {
            return Math.Sqrt((p.X - X) * (p.X - X) + (p.Y - Y) * (p.Y - Y));
        }

        public bool IsInsideRectangle(double l, double b, double r, double t)
        {
            return (l <= X) && (X <= r) && (b <= Y) && (Y <= t);
        }
    }

    internal class LineInt
    {
        public LineInt(PointInt a, PointInt b)
        {
            A = a.Y - b.Y;
            B = b.X - a.X;
            C = a.X * b.Y - a.Y * b.X;
        }

        public long A, B, C;

        public bool ContainsPoint(PointInt p)
        {
            return A * p.X + B * p.Y + C == 0;
        }

        public int Sign(PointInt p)
        {
            return Math.Sign(A * p.X + B * p.Y + C);
        }
    }

    internal static class Geometry
    {
        public static long VectInt(PointInt a, PointInt b)
        {
            return a.X * b.Y - a.Y * b.X;
        }

        public static long VectInt(PointInt a, PointInt b, PointInt c)
        {
            return (b.X - a.X) * (c.Y - a.Y) - (b.Y - a.Y) * (c.X - a.X);
        }
    }

    internal class MatrixInt
    {
        private readonly long[,] m_Matrix;

        public int Size
        {
            get { return m_Matrix.GetLength(0); }
        }

        public long Mod { get; private set; }

        public MatrixInt(int size, long mod = 0)
        {
            m_Matrix = new long[size,size];
            Mod = mod;
        }

        public MatrixInt(long[,] matrix, long mod = 0)
        {
            var size = matrix.GetLength(0);
            m_Matrix = new long[size,size];
            Array.Copy(matrix, m_Matrix, size * size);
            Mod = mod;

            if (mod != 0)
            {
                for (int i = 0; i < size; i++)
                {
                    for (int j = 0; j < size; j++)
                    {
                        m_Matrix[i, j] %= mod;
                    }
                }
            }
        }

        public static MatrixInt IdentityMatrix(int size, long mod = 0)
        {
            long[,] matrix = new long[size,size];

            for (int i = 0; i < size; i++)
            {
                matrix[i, i] = 1;
            }

            return new MatrixInt(matrix, mod);
        }

        public long this[int i, int j]
        {
            get { return m_Matrix[i, j]; }

            set { m_Matrix[i, j] = value; }
        }

        public static MatrixInt operator +(MatrixInt a, MatrixInt b)
        {
            int n = a.Size;
            long mod = Math.Max(a.Mod, b.Mod);
            long[,] c = new long[n,n];
            for (int i = 0; i < n; i++)
            {
                for (int j = 0; j < n; j++)
                {
                    c[i, j] = a[i, j] + b[i, j];
                }
            }

            if (mod > 0)
            {
                for (int i = 0; i < n; i++)
                {
                    for (int j = 0; j < n; j++)
                    {
                        c[i, j] %= mod;
                    }
                }
            }

            return new MatrixInt(c, mod);
        }

        public static MatrixInt operator *(MatrixInt a, MatrixInt b)
        {
            int n = a.Size;
            long mod = Math.Max(a.Mod, b.Mod);

            long[,] c = new long[n,n];

            for (int i = 0; i < n; i++)
            {
                for (int j = 0; j < n; j++)
                {
                    for (int k = 0; k < n; k++)
                    {
                        c[i, j] += a[i, k] * b[k, j];
                        if (mod > 0)
                        {
                            c[i, j] %= mod;
                        }
                    }
                }
            }

            return new MatrixInt(c, mod);
        }

        public void Print()
        {
            for (int i = 0; i < Size; i++)
            {
                for (int j = 0; j < Size; j++)
                {
                    Console.Write("{0} ", m_Matrix[i, j]);
                }
                Console.WriteLine();
            }
        }
    }

    public static class Permutations
    {
        private static readonly Random m_Random;

        static Permutations()
        {
            m_Random = new Random();
        }

        public static int[] GetRandomPermutation(int n)
        {
            int[] p = new int[n];
            for (int i = 0; i < n; i++)
            {
                p[i] = i;
            }

            for (int i = n - 1; i > 0; i--)
            {
                int j = m_Random.Next(i + 1);
                int tmp = p[i];
                p[i] = p[j];
                p[j] = tmp;
            }

            return p;
        }

        /*public static T[] Shuffle<T>(this T[] array)
        {
            int length = array.Length;
            int[] p = GetRandomPermutation(length);
            T[] result = new T[length];
            for (int i = 0; i < length; i++)
            {
                result[i] = array[p[i]];
            }

            return result;
        }*/

        /*public static T[] ShuffleSort<T>(this T[] array)
        {
            var result = array.Shuffle();
            Array.Sort(result);
            return result;
        }*/

        public static void Shuffle<T>(T[] array)
        {
            var n = array.Count();
            for (int i = n - 1; i > 0; i--)
            {
                int j = m_Random.Next(i + 1);
                T tmp = array[i];
                array[i] = array[j];
                array[j] = tmp;
            }
        }

        public static void ShuffleSort<T>(T[] array)
        {
            Shuffle(array);
            Array.Sort(array);
        }

        public static int[] Next(int[] p)
        {
            int n = p.Length;
            var next = new int[n];
            Array.Copy(p, next, n);

            int k = -1;
            for (int i = n - 1; i > 0; i--)
            {
                if (next[i - 1] < next[i])
                {
                    k = i - 1;
                    break;
                }
            }
            if (k == -1)
            {
                return null;
            }
            for (int i = n - 1; i >= 0; i--)
            {
                if (next[i] > next[k])
                {
                    var tmp = next[i];
                    next[i] = next[k];
                    next[k] = tmp;
                    break;
                }
            }
            for (int i = 1; i <= (n - k - 1) / 2; i++)
            {
                var tmp = next[k + i];
                next[k + i] = next[n - i];
                next[n - i] = tmp;
            }

            return next;
        }
    }

    internal static class Algebra
    {
        public static long Phi(long n)
        {
            long result = n;
            for (long i = 2; i * i <= n; i++)
            {
                if (n % i == 0)
                {
                    while (n % i == 0)
                    {
                        n /= i;
                    }

                    result -= result / i;
                }
            }

            if (n > 1)
            {
                result -= result / n;
            }

            return result;
        }

        public static long BinPower(long a, long n, long mod)
        {
            long result = 1;

            while (n > 0)
            {
                if ((n & 1) != 0)
                {
                    result = (result * a) % mod;
                }

                a = (a * a) % mod;
                n >>= 1;
            }

            return result;
        }

        public static MatrixInt MatrixBinPower(MatrixInt a, long n)
        {
            MatrixInt result = MatrixInt.IdentityMatrix(a.Size, a.Mod);

            while (n > 0)
            {
                if ((n & 1) != 0)
                {
                    result *= a;
                }

                a *= a;
                n >>= 1;
            }

            return result;
        }

        public static long Gcd(long a, long b)
        {
            return b == 0 ? a : Gcd(b, a % b);
        }

        public static long ExtendedGcd(long a, long b, out long x, out long y)
        {
            if (b == 0)
            {
                x = 1;
                y = 0;
                return a;
            }

            long x1;
            long y1;
            long d = ExtendedGcd(b, a % b, out x1, out y1);
            x = y1;
            y = x1 - (a / b) * y1;
            return d;
        }

        public static long Lcm(long a, long b)
        {
            return (a / Gcd(a, b)) * b;
        }

        public static bool[] GetPrimes(int n)
        {
            n = Math.Max(n, 2);
            bool[] prime = new bool[n + 1];
            for (int i = 2; i <= n; i++)
            {
                prime[i] = true;
            }

            for (int i = 2; i * i <= n; i++)
            {
                if (prime[i])
                {
                    if ((long)i * i <= n)
                    {
                        for (int j = i * i; j <= n; j += i)
                        {
                            prime[j] = false;
                        }
                    }
                }
            }

            return prime;
        }

        public static long GetFibonacciNumber(long n, long mod = 0)
        {
            long[,] matrix = new long[,] { { 0, 1 }, { 1, 1 } };

            MatrixInt result = MatrixBinPower(new MatrixInt(matrix, mod), n);

            return result[1, 1];
        }

        public static long[] GetFibonacciSequence(int n)
        {
            long[] result = new long[n];
            result[0] = result[1] = 1;

            for (int i = 2; i < n; i++)
            {
                result[i] = result[i - 1] + result[i - 2];
            }

            return result;
        }

        public static long GetInverseElement(long a, long mod)
        {
            long x, y;
            long g = ExtendedGcd(a, mod, out x, out y);

            if (g != 1)
            {
                return -1;
            }

            return ((x % mod) + mod) % mod;
        }

        public static long[] GetAllInverseElements(long n, long mod)
        {
            long[] result = new long[n];
            result[1] = 1;
            for (int i = 2; i < n; i++)
            {
                result[i] = (mod - (((mod / i) * result[mod % i]) % mod)) % mod;
            }

            return result;
        }

        public static int GetMinimalPrimeDivisor(int n)
        {
            for (int i = 2; i * i <= n; i++)
            {
                if (n % i == 0)
                {
                    return i;
                }
            }

            return n;
        }

        public static long Sqr(long x)
        {
            return x * x;
        }

        public static int SumOfDigits(long x, long baseMod = 10)
        {
            int res = 0;
            while (x > 0)
            {
                res += (int)(x % baseMod);
                x = x / baseMod;
            }
            return res;
        }
    }

    public static class OrderStatistic
    {
        public static T GetKthElement<T>(this IList<T> list, int k) where T : IComparable
        {
            return Select(list, 0, list.Count - 1, k);
        }

        private static T Select<T>(IList<T> list, int l, int r, int k) where T : IComparable
        {
            if (l == r)
                return list[l];

            T x = list[(l + r) / 2];
            var i = l;
            var j = r;
            do
            {
                while (list[i].CompareTo(x) < 0)
                    i++;
                while (list[j].CompareTo(x) > 0)
                    j--;
                if (i <= j)
                {
                    T tmp = list[i];
                    list[i] = list[j];
                    list[j] = tmp;

                    i++;
                    j--;
                }
            }
            while (i <= j);

            if (j < l)
                j++;
            if (k <= j - l + 1)
                return Select(list, l, j, k);
            return Select(list, j + 1, r, k - (j - l + 1));
        }
    }

    internal static class Reader
    {
        public static void Read<T>(out T v1)
        {
            var values = new T[1];
            Read(values);
            v1 = values[0];
        }

        public static void Read<T>(out T v1, out T v2)
        {
            var values = new T[2];
            Read(values);
            v1 = values[0];
            v2 = values[1];
        }

        public static void Read<T>(out T v1, out T v2, out T v3)
        {
            var values = new T[3];
            Read(values);
            v1 = values[0];
            v2 = values[1];
            v3 = values[2];
        }

        public static void Read<T>(out T v1, out T v2, out T v3, out T v4)
        {
            var values = new T[4];
            Read(values);
            v1 = values[0];
            v2 = values[1];
            v3 = values[2];
            v4 = values[3];
        }

        public static void Read<T>(out T v1, out T v2, out T v3, out T v4, out T v5)
        {
            var values = new T[5];
            Read(values);
            v1 = values[0];
            v2 = values[1];
            v3 = values[2];
            v4 = values[3];
            v5 = values[4];
        }

        public static void Read<T>(T[] values)
        {
            Read(values, values.Length);
        }

        public static void Read<T>(T[] values, int count)
        {
            // ReSharper disable PossibleNullReferenceException
            var list = Console.ReadLine().Split();
            // ReSharper restore PossibleNullReferenceException

            count = Math.Min(count, list.Length);

            var converter = TypeDescriptor.GetConverter(typeof(T));

            for (int i = 0; i < count; i++)
            {
                values[i] = (T)converter.ConvertFromString(list[i]);
            }
        }

        public static int[] ReadDigits()
        {
            // ReSharper disable AssignNullToNotNullAttribute
            return Console.ReadLine().Select(x => int.Parse(x.ToString(CultureInfo.InvariantCulture))).ToArray();
            // ReSharper restore AssignNullToNotNullAttribute
        }

        public static string ReadLine()
        {
            return Console.ReadLine();
        }
    }

    public interface IGraph
    {
        bool IsOriented { get; set; }

        int Vertices { get; set; }

        IList<int> this[int i] { get; }

        void AddEdge(int u, int v);

        void AddOrientedEdge(int u, int v);

        void AddNotOrientedEdge(int u, int v);
    }

    public class ListGraph : IGraph
    {
        private readonly List<int>[] m_Edges;

        public int Vertices { get; set; }

        public bool IsOriented { get; set; }

        public IList<int> this[int i]
        {
            get { return this.m_Edges[i]; }
        }

        public ListGraph(int vertices, bool isOriented = false)
        {
            this.Vertices = vertices;
            this.IsOriented = isOriented;

            this.m_Edges = new List<int>[vertices];

            for (int i = 0; i < vertices; i++)
            {
                this.m_Edges[i] = new List<int>();
            }
        }

        public void AddEdge(int u, int v)
        {
            this.AddOrientedEdge(u, v);
            if (!IsOriented)
            {
                this.AddOrientedEdge(v, u);
            }
        }

        public void AddNotOrientedEdge(int u, int v)
        {
            this.AddOrientedEdge(u, v);
            this.AddOrientedEdge(v, u);
        }

        public void AddOrientedEdge(int first, int second)
        {
            this.m_Edges[first].Add(second);
        }
    }

    public static class GraphAlgorithms
    {
        private static bool[] v;

        private static int[] a;

        private static int c;

        public static int[] Bfs(this IGraph graph, int start)
        {
            int[] d = new int[graph.Vertices];
            for (int i = 0; i < graph.Vertices; i++)
            {
                d[i] = -1;
            }

            Queue<int> queue = new Queue<int>();
            queue.Enqueue(start);
            d[start] = 0;

            while (queue.Count > 0)
            {
                int v = queue.Dequeue();
                foreach (int t in graph[v].Where(t => d[t] == -1))
                {
                    queue.Enqueue(t);
                    d[t] = d[v] + 1;
                }
            }

            return d;
        }

        public static int[] TopSort(this IGraph graph)
        {
            v = new bool[graph.Vertices];
            a = new int[graph.Vertices];
            c = graph.Vertices;

            for (int i = 0; i < graph.Vertices; i++)
            {
                if (!v[i])
                {
                    TopSortDfs(graph, i);
                }
            }

            return a;
        }

        private static void TopSortDfs(IGraph graph, int t)
        {
            v[t] = true;
            foreach (var next in graph[t])
            {
                if (!v[next])
                {
                    TopSortDfs(graph, next);
                }
            }
            c--;
            a[c] = t;
        }
    }

    internal class SimpleSumTable
    {
        private readonly int[,] m_Sum;

        public SimpleSumTable(int n, int m, int[,] table)
        {
            m_Sum = new int[n + 1,m + 1];

            for (int i = 1; i < n + 1; i++)
            {
                for (int j = 1; j < m + 1; j++)
                {
                    m_Sum[i, j] = m_Sum[i, j - 1] + m_Sum[i - 1, j] - m_Sum[i - 1, j - 1] + table[i - 1, j - 1];
                }
            }
        }

        public int GetSum(int l, int b, int r, int t)
        {
            return m_Sum[r + 1, t + 1] - m_Sum[r + 1, b] - m_Sum[l, t + 1] + m_Sum[l, b];
        }
    }

    internal class SegmentTreeSimpleInt<T>
    {
        public int Size { get; private set; }

        private readonly T[] m_Tree;

        private readonly Func<T, T, T> m_Operation;

        private readonly T m_Null;

        public SegmentTreeSimpleInt(int size, Func<T, T, T> operation, T nullElement, IList<T> array = null)
        {
            this.Size = size;
            this.m_Operation = operation;
            this.m_Null = nullElement;

            m_Tree = new T[4 * size];
            if (array != null)
            {
                this.Build(array, 1, 0, size - 1);
            }
        }

        private void Build(IList<T> array, int v, int tl, int tr)
        {
            if (tl == tr)
            {
                m_Tree[v] = array[tl];
            }
            else
            {
                int tm = (tl + tr) / 2;
                this.Build(array, 2 * v, tl, tm);
                this.Build(array, 2 * v + 1, tm + 1, tr);
                this.CalculateNode(v);
            }
        }

        public T GetSum(int l, int r)
        {
            return GetSum(1, 0, Size - 1, l, r);
        }

        private T GetSum(int v, int tl, int tr, int l, int r)
        {
            if (l > r)
            {
                return m_Null;
            }

            if (l == tl && r == tr)
            {
                return m_Tree[v];
            }

            int tm = (tl + tr) / 2;

            return this.m_Operation(
                GetSum(2 * v, tl, tm, l, Math.Min(r, tm)), GetSum(2 * v + 1, tm + 1, tr, Math.Max(l, tm + 1), r));
        }

        public void Update(int pos, T newValue)
        {
            Update(1, 0, Size - 1, pos, newValue);
        }

        private void Update(int v, int tl, int tr, int pos, T newValue)
        {
            if (tl == tr)
            {
                m_Tree[v] = newValue;
            }
            else
            {
                int tm = (tl + tr) / 2;
                if (pos <= tm)
                {
                    Update(2 * v, tl, tm, pos, newValue);
                }
                else
                {
                    Update(2 * v + 1, tm + 1, tr, pos, newValue);
                }
                this.CalculateNode(v);
            }
        }

        private void CalculateNode(int v)
        {
            m_Tree[v] = this.m_Operation(m_Tree[2 * v], m_Tree[2 * v + 1]);
        }
    }

    internal struct Pair<TFirst, TSecond>
    {
        public Pair(TFirst first, TSecond second)
            : this()
        {
            this.First = first;
            this.Second = second;
        }

        public TFirst First { set; get; }

        public TSecond Second { set; get; }

        private bool Equals(Pair<TFirst, TSecond> other)
        {
            return EqualityComparer<TFirst>.Default.Equals(this.First, other.First)
                   && EqualityComparer<TSecond>.Default.Equals(this.Second, other.Second);
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj))
            {
                return false;
            }
            if (ReferenceEquals(this, obj))
            {
                return true;
            }
            if (obj.GetType() != this.GetType())
            {
                return false;
            }
            return Equals((Pair<TFirst, TSecond>)obj);
        }

        public override int GetHashCode()
        {
            unchecked
            {
                return (EqualityComparer<TFirst>.Default.GetHashCode(this.First) * 397)
                       ^ EqualityComparer<TSecond>.Default.GetHashCode(this.Second);
            }
        }
    }

    internal class FenwickTreeInt64
    {
        public FenwickTreeInt64(int size)
        {
            this.m_Size = size;
            m_Tree = new long[size];
        }

        public FenwickTreeInt64(int size, IList<long> tree)
            : this(size)
        {
            for (int i = 0; i < size; i++)
            {
                Inc(i, tree[i]);
            }
        }

        public long Sum(int r)
        {
            long res = 0;
            for (; r >= 0; r = (r & (r + 1)) - 1)
            {
                res += m_Tree[r];
            }
            return res;
        }

        public long Sum(int l, int r)
        {
            return Sum(r) - Sum(l - 1);
        }

        public void Inc(int i, long x)
        {
            for (; i < m_Size; i = i | (i + 1))
            {
                m_Tree[i] += x;
            }
        }

        public void Set(int i, long x)
        {
            Inc(i, x - Sum(i, i));
        }

        private readonly int m_Size;

        private readonly long[] m_Tree;
    }

    internal class AccumulativeDictionary<TKey> : Dictionary<TKey, int>
    {
        public new void Add(TKey key, int value = 1)
        {
            if (this.ContainsKey(key))
            {
                base[key] += value;
            }
            else
            {
                base.Add(key, value);
            }
        }

        public new int this[TKey key]
        {
            get { return this.ContainsKey(key) ? base[key] : 0; }
            set { this.Add(key, value); }
        }
    }

    public class PriorityQueue<T>
    {
        public PriorityQueue(Comparison<T> comparison = null)
        {
            if (comparison == null)
            {
                if (typeof(T).GetInterfaces().Any(i => i == typeof(IComparable<T>)))
                {
                    m_Comparison = (a, b) => ((IComparable<T>)a).CompareTo(b);
                }
                else
                {
                    throw new ApplicationException("Add comparer");
                }
            }
            else
            {
                m_Comparison = comparison;
            }
        }

        public int Count { get; private set; }

        public void Enqueue(T item)
        {
            m_List.Add(item);
            m_Indexes.Add(item, this.Count);
            this.Count++;
            Up(this.Count);
        }

        public T Peek()
        {
            return m_List[0];
        }

        public T Dequeue()
        {
            if (this.Count > 0)
            {
                var result = m_List[0];

                Swap(0, this.Count - 1);
                m_Indexes.Remove(m_List[this.Count - 1]);
                m_List.RemoveAt(this.Count - 1);
                this.Count--;
                this.Down(1);

                return result;
            }
            throw new ApplicationException("Couldn't get element from empty queue");
        }

        public void Update(T item)
        {
            int index = m_Indexes[item];
            this.Up(index + 1);
        }

        private readonly List<T> m_List = new List<T>();

        private readonly Dictionary<T, int> m_Indexes = new Dictionary<T, int>();

        private readonly Comparison<T> m_Comparison;

        private void Up(int index)
        {
            while (index > 1 && m_Comparison.Invoke(m_List[index - 1], m_List[index / 2 - 1]) > 0)
            {
                this.Swap(index - 1, index / 2 - 1);

                index = index / 2;
            }
        }

        private void Down(int index)
        {
            while (2 * index <= this.Count && m_Comparison.Invoke(m_List[index - 1], m_List[2 * index - 1]) < 0
                   || 2 * index + 1 <= this.Count && m_Comparison.Invoke(m_List[index - 1], m_List[2 * index]) < 0)
            {
                if (2 * index + 1 > this.Count || m_Comparison.Invoke(m_List[2 * index - 1], m_List[2 * index]) > 0)
                {
                    this.Swap(index - 1, 2 * index - 1);
                    index = 2 * index;
                }
                else
                {
                    this.Swap(index - 1, 2 * index);
                    index = 2 * index + 1;
                }
            }
        }

        private void Swap(int i, int j)
        {
            var tmp = m_List[i];
            m_List[i] = m_List[j];
            m_List[j] = tmp;

            m_Indexes[m_List[i]] = i;
            m_Indexes[m_List[j]] = j;
        }
    }

    public class DisjointSetUnion<T>
    {
        public DisjointSetUnion()
        {
            m_Parent = new Dictionary<T, T>();
            m_Rank = new Dictionary<T, int>();
        }

        public DisjointSetUnion(DisjointSetUnion<T> set)
        {
            m_Parent = new Dictionary<T, T>(set.m_Parent);
            m_Rank = new Dictionary<T, int>(set.m_Rank);
        }

        private readonly Dictionary<T, T> m_Parent;

        private readonly Dictionary<T, int> m_Rank;

        public int GetRank(T x)
        {
            return m_Rank[x];
        }

        public void MakeSet(T x)
        {
            m_Parent[x] = x;
            this.m_Rank[x] = 0;
        }

        public void UnionSets(T x, T y)
        {
            x = this.FindSet(x);
            y = this.FindSet(y);
            if (!x.Equals(y))
            {
                if (m_Rank[x] < m_Rank[y])
                {
                    T t = x;
                    x = y;
                    y = t;
                }
                m_Parent[y] = x;
                if (m_Rank[x] == m_Rank[y])
                {
                    m_Rank[x]++;
                }
            }
        }

        public T FindSet(T x)
        {
            if (x.Equals(m_Parent[x]))
            {
                return x;
            }
            return m_Parent[x] = this.FindSet(m_Parent[x]);
        }
    }

    internal class HamiltonianPathFinder
    {
        public static void Run()
        {
            int n, m;
            Reader.Read(out n, out m);
            List<int>[] a = new List<int>[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = new List<int>();
            }
            for (int i = 0; i < m; i++)
            {
                int x, y;
                Reader.Read(out x, out y);
                a[x].Add(y);
                a[y].Add(x);
            }

            var rnd = new Random();

            bool[] v = new bool[n];
            int[] p = new int[n];
            for (int i = 0; i < n; i++)
            {
                p[i] = -1;
            }
            int first = rnd.Next(n);
            int cur = first;
            v[cur] = true;

            int count = 1;

            while (true)
            {
                var unb = a[cur].Where(u => !v[u]).ToList();
                int d = unb.Count;
                if (d > 0)
                {
                    int next = unb[rnd.Next(d)];
                    v[next] = true;
                    p[cur] = next;
                    cur = next;
                    count++;
                }
                else
                {
                    if (count == n && a[cur].Contains(first))
                    {
                        p[cur] = first;
                        break;
                    }

                    d = a[cur].Count;
                    int pivot;
                    do
                    {
                        pivot = a[cur][rnd.Next(d)];
                    }
                    while (p[pivot] == cur);

                    int next = p[pivot];

                    int x = next;
                    int y = -1;
                    while (true)
                    {
                        int tmp = p[x];
                        p[x] = y;
                        y = x;
                        x = tmp;
                        if (y == cur)
                        {
                            break;
                        }
                    }
                    p[pivot] = cur;
                    cur = next;
                }
            }

            cur = first;
            do
            {
                Console.Write("{0} ", cur);
                cur = p[cur];
            }
            while (cur != first);
        }

        public static void WriteTest(int n)
        {
            Console.WriteLine("{0} {1}", 2 * n, 2 * (n - 1) + n);
            for (int i = 0; i < n - 1; i++)
            {
                Console.WriteLine("{0} {1}", 2 * i, 2 * i + 2);
                Console.WriteLine("{0} {1}", 2 * i + 1, 2 * i + 3);
                //Console.WriteLine("{0} {1}", 2 * i + 1, 2 * i + 2);
                //Console.WriteLine("{0} {1}", 2 * i, 2 * i + 3);
            }
            for (int i = 0; i < n; i++)
            {
                Console.WriteLine("{0} {1}", 2 * i, 2 * i + 1);
            }
        }
    }

    internal class Backtrack<T>
        where T : class
    {
        public Backtrack(Func<T, IEnumerable<T>> generator)
        {
            this.m_Generator = generator;
        }

        public Dictionary<T, T> Generate(T startState)
        {
            var result = new Dictionary<T, T>();
            result.Add(startState, null);

            var queue = new Queue<T>();
            queue.Enqueue(startState);

            while (queue.Count > 0)
            {
                var current = queue.Dequeue();
                var next = m_Generator(current);
                foreach (var state in next)
                {
                    if (!result.ContainsKey(state))
                    {
                        result[state] = current;
                        queue.Enqueue(state);
                    }
                }
            }

            return result;
        }

        private Func<T, IEnumerable<T>> m_Generator;
    }

    public static class Utility
    {
        public static readonly int[] sx = new[] { 1, 0, -1, 0 };

        public static readonly int[] sy = new[] { 0, 1, 0, -1 };

        public static PointInt[] GenerateNeighbors(long x, long y)
        {
            var result = new PointInt[4];
            for (int i = 0; i < 4; i++)
            {
                result[i] = new PointInt(x + sx[i], y + sy[i]);
            }
            return result;
        }

        public static PointInt[] GenerateNeighbors(this PointInt p)
        {
            return GenerateNeighbors(p.X, p.Y);
        }

        public static List<PointInt> GenerateNeighborsWithBounds(long x, long y, int n, int m)
        {
            var result = new List<PointInt>(4);
            for (int i = 0; i < 4; i++)
            {
                var nx = x + sx[i];
                var ny = y + sy[i];
                if (0 <= nx && nx < n && 0 <= ny && ny < m)
                {
                    result.Add(new PointInt(nx, ny));
                }
            }
            return result;
        }

        public static List<PointInt> GenerateNeighborsWithBounds(this PointInt p, int n, int m)
        {
            return GenerateNeighborsWithBounds(p.X, p.Y, n, m);
        }

        public static void Swap<T>(ref T x, ref T y)
        {
            T tmp = x;
            x = y;
            y = tmp;
        }
    }

    public static class FFTMultiply
    {
        public static int[] Multiply(int[] a, int[] b)
        {
            var result = Multiply(
                a.Select(x => new Complex(x, 0)).ToArray(), b.Select(x => new Complex(x, 0)).ToArray());
            return result.Select(x => (int)Math.Round(x.Real)).ToArray();
        }

        public static Complex[] Multiply(Complex[] a, Complex[] b)
        {
            var n = 1;
            while (n < Math.Max(a.Length, b.Length))
            {
                n <<= 1;
            }
            n <<= 1;

            var fa = new Complex[n];
            Array.Copy(a, fa, a.Length);
            var fb = new Complex[n];
            Array.Copy(b, fb, b.Length);

            FFT(fa, false);
            FFT(fb, false);

            for (int i = 0; i < n; i++)
            {
                fa[i] *= fb[i];
            }

            FFT(fa, true);
            for (int i = 0; i < n; i++)
            {
                fa[i] /= n;
            }
            return fa;
        }

        private static void FFT(IList<Complex> a, bool invert)
        {
            var n = a.Count;
            if (n == 1)
            {
                return;
            }

            var a0 = new Complex[n / 2];
            var a1 = new Complex[n / 2];
            for (int i = 0; i < n / 2; i++)
            {
                a0[i] = a[2 * i];
                a1[i] = a[2 * i + 1];
            }
            FFT(a0, invert);
            FFT(a1, invert);

            Complex w = 1;
            var ang = 2 * Math.PI / n * (invert ? -1 : 1);
            Complex wn = new Complex(Math.Cos(ang), Math.Sin(ang));

            for (int i = 0; i < n / 2; i++)
            {
                a[i] = a0[i] + w * a1[i];
                a[i + n / 2] = a0[i] - w * a1[i];
                w *= wn;
            }
        }
    }

    internal class Program
    {
        private static StreamReader m_InputStream;

        private static StreamWriter m_OutStream;

        private static void OpenFiles()
        {
            m_InputStream = new StreamReader("input.txt"); //File.OpenText("input.txt");
            Console.SetIn(m_InputStream);

            m_OutStream = new StreamWriter("output.txt"); //File.CreateText("output.txt");
            Console.SetOut(m_OutStream);
        }

        private static void CloseFiles()
        {
            m_OutStream.Flush();

            m_InputStream.Dispose();
            m_OutStream.Dispose();
        }

        private static void Main()
        {
            //Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;

           // OpenFiles();

            var mainThread = new Thread(() => new Solution().Solve(), 50 * 1024 * 1024);
            mainThread.Start();
            mainThread.Join();

          //  CloseFiles();
        }
    }

    internal class Solution
    {
        public void Solve()
        {
            var max = 1000001;
            int[] a = new int[max];
            int[] b = new int[max];
            for (int i = 0; i < 8; i++)
            {
                int x, y;
                Reader.Read(out x, out y);
                a[x]++;
                b[y]++;
            }

            var ok = true;

            int[] c = new[] { 3, 2, 3 };

            int j = 0;
            for (int i = 0; i < max; i++)
            {
                if (a[i] > 0)
                {
                    ok &= a[i] == c[j];
                    j++;
                    if (j > 2)
                    {
                        break;
                    }
                }
            }

            j = 0;
            for (int i = 0; i < max; i++)
            {
                if (b[i] > 0)
                {
                    ok &= b[i] == c[j];
                    j++;
                    if (j > 2)
                    {
                        break;
                    }
                }
            }

            Console.WriteLine(ok ? "respectable" : "ugly");
        }
    }
}

using System;
using System.Collections.Generic;

namespace _334B
{
    class Program
    {
        static void Main(string[] args)
        {
            int[,] Array = new int[10, 2];
            Array[8, 0] = int.MaxValue;
            Array[8, 1] = int.MaxValue;
            Array[9, 0] = -1;
            Array[9, 1] = -1;
            string[] Input;
            for (int i = 0; i < 8; i++)
            {
                Input = Console.ReadLine().Split();
                Array[i, 0] = Convert.ToInt32(Input[0]);
                Array[i, 1] = Convert.ToInt32(Input[1]);
            }

            int One = 0;
            int Two = 0;

            for (int i = 0; i < 8; i++)
            {
                int LocalX = 0;
                int LocalY = 0;
                for (int j = 0; j < 8; j++)
                {
                    if (Array[i, 0] == Array[j, 0]) LocalX++;

                    if (Array[i, 1] == Array[j, 1]) LocalY++;
                }

                if (LocalX == 2) One++;
                else if (LocalX == 3) Two++;

                if (LocalY == 2) One++;
                else if (LocalY == 3) Two++;
            }

            if (One == 4 && Two == 12)
            {
                List<int> LeftList = new List<int>() { 8 };
                List<int> DownList = new List<int>() { 8 };
                List<int> RightList = new List<int>() { 9 };
                List<int> UpList = new List<int>() { 9 };

                for (int i = 0; i < 8; i++)
                {
                    if (Array[i, 0] < Array[LeftList[0], 0]) LeftList = new List<int>() { i };
                    else if (Array[i, 0] == Array[LeftList[0], 0]) LeftList.Add(i); // + условие заполниности массива

                    if (Array[i, 1] < Array[DownList[0], 1]) DownList = new List<int>() { i };
                    else if (Array[i, 1] == Array[DownList[0], 1]) DownList.Add(i); // + условие заполниности массива

                    if (Array[i, 0] > Array[RightList[0], 0]) RightList = new List<int>() { i };
                    else if (Array[i, 0] == Array[RightList[0], 0]) RightList.Add(i); // + условие заполниности массива

                    if (Array[i, 1] > Array[UpList[0], 1]) UpList = new List<int>() { i };
                    else if (Array[i, 1] == Array[UpList[0], 1]) UpList.Add(i); // + условие заполниности массива
                }

                if (LeftList.Count == 3 && DownList.Count == 3 && RightList.Count == 3 && UpList.Count == 3) Console.WriteLine("respectable");
                else Console.WriteLine("ugly");
            }
            else Console.WriteLine("ugly");
        }
    }
}

using System;
using System.Linq;

class Scanner
{
    private char[] delimiters = new char[] { ' ' };
    private string[] s;
    private int idx;

    public Scanner()
    {
        s = new string[0];
        idx = 0;
    }

    public string Next()
    {
        if (idx < s.Length)
            return s[idx++];
        idx = 0;
        s = Console.ReadLine().Split(delimiters, StringSplitOptions.RemoveEmptyEntries);
        return s[idx++];
    }

    public int NextInt()
    {
        return int.Parse(Next());
    }

    public long NextLong()
    {
        return long.Parse(Next());
    }
}

class Solution
{
    Scanner cin;
    int n, m, a, b;

    public void Go()
    {
        cin = new Scanner();
        int[] x = new int[8];
        int[] y = new int[8];
        int[] sx = new int[8];
        int[] sy = new int[8];
        bool[] ok = new bool[8];
        for (int i = 0; i < 8; i++) {
            sx[i] = x[i] = cin.NextInt();
            sy[i] = y[i] = cin.NextInt();
        }

        Array.Sort(sx);
        Array.Sort(sy);
        int[] xx = sx.Distinct().ToArray();
        int[] yy = sy.Distinct().ToArray();
        bool okay = false;
        if (xx.Length == 3 && yy.Length == 3) {
            for (int a = 0; a < 3; a++)
                for (int b = 0; b < 3; b++)
                    if (a != 1 || b != 1)
                        for (int i = 0; i < 8; i++)
                            if (x[i] == xx[a] && y[i] == yy[b])
                                ok[i] = true;
            okay = true;
            for (int i = 0; i < 8; i++)
                okay &= ok[i];
        }

        if (okay)
            Console.WriteLine("respectable");
        else
            Console.WriteLine("ugly");
    }

    static void Main(string[] args)
    {
        new Solution().Go();
    }
}

using System;
using System.Linq;

namespace _334B
{
	class Program
	{
		static void Main(string[] args)
		{
			int[] x = new int[8];
			int[] y = new int[8];
			for (int i = 0; i < 8; i++)
			{
				int[] ip = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
				x[i] = ip[0];
				y[i] = ip[1];
			}
			int[] xx = x.Distinct().ToArray();
			int[] yy = y.Distinct().ToArray();
			bool b = false;
			if (xx.Length == 3 && yy.Length == 3)
			{
				Array.Sort(xx);
				Array.Sort(yy);
				b = true;
				for (int i = 0; i < 3; i++)
				{
					for (int j = 0; j < 3; j++)
					{
						if (i != 1 || j != 1)
						{
							bool c = false;
							for (int k = 0; k < 8; k++)
							{
								if (x[k] == xx[i] && y[k] == yy[i])
								{
									c = true;
									break;
								}
							}
							b &= c;
						}
						if (b == false)
						{
							break;
						}
					}
					if (b == false)
					{
						break;
					}
				}
			}
			if (b)
			{
				Console.WriteLine("respectable");
			}
			else
			{
				Console.WriteLine("ugly");
			}
		}
	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _334B
{
	public class Point
	{
		public int x;
		public int y;
		public Point(int x, int y)
		{
			this.x = x;
			this.y = y;
		}

	}
	class Program
	{
		static void Main(string[] args)
		{
			Point[] p = new Point[8];
			List<int> ax = new List<int>();
			List<int> ay = new List<int>();
			List<int> cx = new List<int>();
			List<int> cy = new List<int>();
			bool b = true;
			for (int i = 0; i < 8; i++)
			{
				int[] ip = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
				Point t = new Point(ip[0], ip[1]);
				if (Array.IndexOf(p, t) != -1)
				{
					b = false;
					break;
				}
				else
				{
					p[i] = t;
					int px = ax.IndexOf(ip[0]);
					if (px == -1)
					{
						ax.Add(ip[0]);
						cx.Add(1);
					}
					else
					{
						cx[px]++;
					}
					int py = ay.IndexOf(ip[0]);
					if (py == -1)
					{
						ay.Add(ip[0]);
						cy.Add(1);
					}
					else
					{
						cy[py]++;
					}
				}
			}
			for (int i = 0; i < ax.Count - 1; i++)
			{
				for (int j = i + 1; j < ax.Count; j++)
				{
					if (ax[i] > ax[j])
					{
						int t = ax[j];
						ax[j] = ax[i];
						ax[i] = t;
						t = cx[j];
						cx[j] = cx[i];
						cx[i] = t;
					}
				}
			}
			for (int i = 0; i < ay.Count - 1; i++)
			{
				for (int j = i + 1; j < ay.Count; j++)
				{
					if (ay[i] > ay[j])
					{
						int t = ay[j];
						ay[j] = ay[i];
						ay[i] = t;
						t = cy[j];
						cy[j] = cy[i];
						cy[i] = t;
					}
				}
			}
			if (ax.Count != 3)
			{
				b = false;
			}
			else
			{
				if (cx[0] != 3 || cx[1] != 2 || cx[2] != 3)
				{
					b = false;
				}
			}
			if (ay.Count != 3)
			{
				b = false;
			}
			else
			{
				if (cy[0] != 3 || cy[1] != 2 || cy[2] != 3)
				{
					b = false;
				}
			}
			if (b)
			{
				Console.WriteLine("respectable");
			}
			else
			{
				Console.WriteLine("ugly");
			}
		}
	}
}

using System;

namespace _334B
{
	public class Point
	{
		public int x;
		public int y;
		public Point(int x, int y)
		{
			this.x = x;
			this.y = y;
		}

	}
	class Program
	{
		static void Main(string[] args)
		{
			Point[] p = new Point[8];
			for (int i = 0; i < 8; i++)
			{
				int[] ip = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
				Point t = new Point(ip[0], ip[1]);
				p[i] = t;
				//p[i].x = ip[0];
				//p[i].y = ip[1];
			}
			Array.Sort(p, (m, n) => m.x.CompareTo(n.x));
			bool b = true;
			if (p[0].x != p[1].x || p[1].x != p[2].x || p[2].x == p[3].x || p[3].x != p[4].x || p[4].x == p[5].x || p[5].x != p[6].x || p[6].x != p[7].x)
			{
				b = false;
			}
			if (p[0].y != p[3].y || p[3].y != p[5].y || p[5].y == p[1].y || p[1].y != p[6].y || p[6].y == p[2].y || p[2].y != p[4].y || p[4].y != p[7].y)
			{
				b = false;
			}
			if (b)
			{
				Console.WriteLine("respectable");
			}
			else
			{
				Console.WriteLine("ugly");
			}
		}
	}
}