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.

type    te = record
                x, y : longint;
                end;
var     a : array[1..8] of te;
        i, j, d1, d2, t : longint;
        flag : boolean;
        xi : array[0..3] of longint;
        yi : array[0..3] of longint;
procedure swap(var x, y : te);
        var     tmp : te;
        begin
          tmp := x;
          x := y;
          y := tmp;
        end;
begin
        flag := true;
        for i := 1 to 8 do
                begin
                readln(a[i].x, a[i].y);
                end;
        for i := 1 to 7 do
                for j := i + 1 to 8 do
                        if a[i].x > a[j].x then
                                swap(a[i], a[j]);
        for i := 1 to 7 do
                begin
                  for j := 1 to 8 do
                        if i <> j then
                                if (a[i].x = a[j].x) and (a[i].y = a[j].y) then
                                        flag := false;
                end;
        d1 := 0; d2 := 0;
        t := -1;
        for i := 1 to 6 do
                If (a[i].x = a[i+1].x) and (a[i].x = a[i+2].x) and
                        (a[i].x <> t) then
                begin
                  t := a[i].x;
                  inc(d1);
                end;
        xi[0] := -1;
        j := 1;
        for i := 1 to 8 do
                if (a[i].x <> xi[j-1]) then
                        if j <= 3 then
                        begin
                          xi[j] := a[i].x;
                          inc(j);
                        end
                        else flag := false;
        // ----------------------------------------
        for i := 1 to 7 do
                for j := i + 1 to 8 do
                        if a[i].y > a[j].y then
                                swap(a[i], a[j]);
        t := -1;
        for i := 1 to 6 do
                if (a[i].y = a[i+1].y) and (a[i].y = a[i+2].y) and
                        (a[i].y <> t) then
                begin
                  t := a[i].y;
                  inc(d2);
                end;
        j := 1;
        yi[0] := -1;
        for i := 1 to 8 do
                if (a[i].y <> yi[j-1]) then
                        if j <= 3 then
                        begin
                          yi[j] := a[i].y;
                          inc(j);
                        end
                        else flag := false;
        for i := 1 to 8 do
                if (a[i].x = xi[2]) and (a[i].y = yi[2]) then
                        flag := false;

        if (d1 = 2) and (d2 = 2) and (flag) then
                writeln('respectable')
        else writeln('ugly');
end.

var
  vis1,vis2:array[0..1000000] of boolean;
  a,b,x,y:array[0..10] of longint;
  i,j,t:longint;
function min(a,b:longint):longint;
begin
  if a<b then exit(a) else exit(b);
end;
function max(a,b:longint):longint;
begin
  if a>b then exit(a) else exit(b);
end;
function judge(xx,yy:longint):boolean;
var
  i:longint;
begin
  if (xx=a[2]) and (yy=b[2]) then exit(true);
  for i:=1 to 8 do if (x[i]=xx) and (y[i]=yy) then exit(true);
  exit(false);
end;
begin
  for i:=1 to 8 do begin
    readln(x[i],y[i]);
    if not vis1[x[i]] then begin
      inc(a[0]);
      a[a[0]]:=x[i];
      vis1[x[i]]:=true;
    end;
    if not vis2[y[i]] then begin
      inc(b[0]);
      b[b[0]]:=y[i];
      vis2[y[i]]:=true;
    end;
  end;
  if (a[0]<>3) or (b[0]<>3) then begin writeln('ugly'); exit; end;
  for i:=1 to 3 do
    for j:=i+1 to 3 do
      if a[i]>a[j] then begin
        t:=a[i]; a[i]:=a[j]; a[j]:=t;
      end;
  for i:=1 to 3 do
    for j:=i+1 to 3 do
      if b[i]>b[j] then begin
        t:=b[i]; b[i]:=b[j]; b[j]:=t;
      end;
  for i:=1 to 3 do
    for j:=1 to 3 do begin
      if not judge(a[i],b[j]) then begin
        writeln('ugly');
        exit;
      end;
    end;
  writeln('respectable');
end.

const finp='';
    fout='';
var x,y:array[1..8] of longint;
procedure nhap;
var i,j,t:longint;
    f:text;
begin
    assign(f,finp);
    reset(f);
    For i:=1 to 8 do readln(f,x[i],y[i]);
    for i:=1 to 7 do
        for j:=i+1 to 8 do
            if (y[i]>y[j])or((y[i]=y[j])and(x[i]>x[j])) then
                begin
                    t:=x[i];
                    x[i]:=x[j];
                    x[j]:=t;
                    t:=y[i];
                    y[i]:=y[j];
                    y[j]:=t;
                end;
    close(f);
end;
procedure xuly;
var f:text;
begin
    assign(f,fout);
    rewrite(f);
    if (x[2]=x[7])and(y[1]=y[2]) then
        if (y[2]=y[3])and(y[5]=y[4]) then
            if (x[1]=x[4])and(x[4]=x[6]) then
                if (y[1]<>y[6])and(x[1]<>x[3]) then
                    if (y[6]=y[7])and(y[7]=y[8]) then
                        if (x[3]=x[5])and(x[5]=x[8]) then
                            if (x[6]<>x[8])and(y[3]<>y[8]) then
                                begin
                                    writeln(f,'respectable');
                                    close(F);
                                    exit;
                                end;
    writeln(f,'ugly');
    close(F);
end;
begin
    nhap;
    xuly;
end.

var j,n,i:longint;
    x,y:array[0..8]of longint;
procedure swap(var q,w:longint);
var z:longint;
 begin
  z:=q;
  q:=w;
  w:=z;
 end;
 begin
  n:=8;
  for i:=1 to n do
   read(x[i],y[i]);
  for i:=1 to n-1 do
   for j:=i+1 to n do
    if(x[i]>x[j])or (x[i]=x[j])and(y[i]>y[j]) then
     begin
      swap(x[i],x[j]);
      swap(y[i],y[j]);
     end;
    if (x[1]=x[2]) and (x[2]=x[3]) and (x[3]<>x[4]) and (x[4]=x[5]) and (x[5]<>x[6]) and (x[6]=x[7]) and (x[7]=x[8]) and
     (y[1]=y[4]) and (y[4]=y[6]) and (y[1]<>y[2]) and (y[2]=y[7]) and (y[2]<>y[3]) and (y[3]=y[5]) and (y[5]=y[8])
     then writeln('respectable')
     else writeln('ugly');
 end.

const   fi='';
        fo='';
var     f,g:text;
        x2,y2,x,y:array[1..8] of longint;
        a:array[1..3,1..3] of boolean;
        dem,dem2,i,j:longint;
        vt,vt2:integer;
        stop:boolean;

        procedure swap(var a,b:longint);
        var     t:longint;
                begin
                        t:=a;
                        a:=b;
                        b:=t;
                end;
begin
        assign(f,fi);
        reset(f);
        assign(g,fo);
        rewrite(g);
        dem:=0;
        dem2:=0;
        for i:=1 to 8 do
        begin
                readln(F,x[i],y[i]);
                stop:=false;
                for j:=1 to dem do
                        if x[i]=x2[j] then
                        begin
                                stop:=true;
                                break;
                        end;
                if stop=false then
                begin
                        dem:=dem+1;
                        x2[dem]:=x[i];
                end;
                stop:=false;
                for j:=1 to dem2 do
                        if y[i]=y2[j] then
                        begin
                                stop:=true;
                                break;
                        end;
                if stop=false then
                begin
                        dem2:=dem2+1;
                        y2[dem2]:=y[i];
                end;
        end;
        close(f);

        if (dem<>3) or (dem2<>3) then writeln(g,'ugly') else
        begin
                for i:=1 to 2 do
                        for j:=i+1 to 3 do
                        begin
                                if x2[i]<x2[j] then
                                        swap(x2[i],x2[j]);
                                if y2[i]<y2[j] then
                                        swap(y2[i],y2[j]);
                        end;
                for i:=1 to 8 do
                begin
                        for j:=1 to 3 do
                                if x[i]=x2[j] then
                                begin
                                        vt:=j;
                                        break;
                                end;
                        for j:=1 to 3 do
                                if y[i]=y2[j] then
                                begin
                                        vt2:=j;
                                        break;
                                end;
                        if ((vt=2) and (vt2=2)) or (a[vt,vt2]=true) then
                        begin
                                writeln(g,'ugly');
                                close(g);
                                halt;
                        end
                        else a[vt,vt2]:=true;
                end;
                writeln(g,'respectable');
        end;
        close(g);
end.

var x, y:array[1..8] of longint;
    i, j, mini, cc, n:longint;
begin
{assign(input, 'input.txt');reset(input);
assign(output, 'output.txt');rewrite(output);}
for i:=1 to 8 do
 readln(x[i], y[i]);
n:=8;
for i:=1 to n-1 do
 begin
 mini:=i;
 for j:=i+1 to n do
 if (x[j]<x[mini]) then mini:=j;
 cc:=x[mini]; x[mini]:=x[i]; x[i]:=cc;
 cc:=y[mini]; y[mini]:=y[i]; y[i]:=cc;
 end;

if (x[1]=x[2])and(x[2]=x[3])and(x[3]<>x[4])and(x[5]=x[4])and(x[5]<>x[6])and(x[6]=x[7])and(x[7]=x[8])
 then begin
      for i:=1 to 2 do
       begin
       mini:=i;
        for j:=i+1 to 3 do
        if (y[mini]>y[j]) then mini:=j;
       cc:=y[mini]; y[mini]:=y[i]; y[i]:=cc;
       end;

      if (y[4]>y[5]) then begin
                          cc:=y[4]; y[4]:=y[5]; y[5]:=cc;
                          end;
      for i:=6 to 7 do
       begin
       mini:=i;
        for j:=i+1 to 8 do
        if (y[mini]>y[j]) then mini:=j;
       cc:=y[mini]; y[mini]:=y[i]; y[i]:=cc;
       end;
      if (y[1]<>y[2])and(y[1]<>y[3])and(y[1]=y[4])and(y[4]=y[6])and(y[2]=y[7])and(y[3]=y[5])and(y[5]=y[8]) then writeln('respectable')
                                                                              else writeln('ugly');
      end
 else writeln('ugly');
//close(input); close(output);
end.

var
  x,y:array[1..8] of longint; i:longint; flag:boolean;

procedure sort;
var i,j,w:longint;
begin
  for i:=1 to 8 do
    for j:=i+1 to 8 do
    if (x[i]>x[j]) or ((x[i]=x[j]) and (y[i]>y[j])) then
    begin
      w:=x[i]; x[i]:=x[j]; x[j]:=w;
      w:=y[i]; y[i]:=y[j]; y[j]:=w;
    end;
end;

begin
  for i:=1 to 8 do readln(x[i],y[i]);
  sort;
  flag:=true;
  if (x[1]<>x[2]) or (x[2]<>x[3]) or (x[3]=x[4]) or (x[4]<>x[5]) or (x[5]=x[6]) or (x[6]<>x[7]) or (x[7]<>x[8]) then flag:=false;
  if (y[1]=y[2]) or (y[2]=y[3]) or (y[1]<>y[4]) or (y[1]<>y[6]) or (y[2]<>y[7]) or (y[3]<>y[5]) or (y[5]<>y[8]) then flag:=false;
  if flag then writeln('respectable') else writeln('ugly');
end.

Const   fi = '';

Var     x, y : array[0..10] of longint;
        i, n, j, dem, p: longint;
        f : array[0..1000005] of boolean;

Procedure swap(var x, y : longint);
 Var    tmp : longint;
 Begin
        tmp := x;
        x := y;
        y := tmp;
 End;

Procedure ghisai;
  Begin
        writeln('ugly');
        halt;
  End;

Begin
        assign(input,fi); reset(input);
        n := 8;
        for i:=1 to n do
                readln(x[i],y[i]);
        close(input);
        for i:=1 to n-1 do
        for j:=i+1 to n do
                if (x[i] > x[j]) or ((x[i] = x[j]) and (y[i] > y[j])) then begin
                        swap(x[i],x[j]);
                        swap(y[i],y[j]);
                end;
        x[0] := -1;
        y[0] := -1;
        for i:=1 to n do
                if x[i] <> x[i-1] then dem := dem+1;
        if dem <> 3 then ghisai;
        dem := 0;
        for i:=1 to n do
                if (y[i] <> y[i-1]) and (f[y[i]] = false) then begin
                        dem := dem+1;
                        f[y[i]] := true;
                end;
        if dem <> 3 then ghisai;
        /////////
        p := x[1];
        for i:=2 to 3 do
                if x[i] <> p then ghisai;
        if x[5] <> x[4] then ghisai;
        p := x[6];
        for i:=7 to 8 do
                if x[i] <> p then ghisai;
        if (y[1] = y[2]) or (y[2] = y[3]) or (y[1] = y[3]) then ghisai;
        if (y[1] <> y[4]) or (y[3] <> y[5]) or (y[1] <> y[6]) or (y[2] <> y[7])
        or (y[3] <> y[8]) then ghisai;
        writeln('respectable');

End.

Const fi='';
      fo='';
var i,j,b: longint;
    x,y: array[1..8] of longint;
    f: boolean; fg,g:Text;
procedure print;
begin
 write(g,'ugly');
 Close(g);
 halt(0);
end;

BEGIN
        assign(fg,fi); reset(fg);
        assign(g,fo); rewrite(g);
        for i:=1 to 8 do readln(fg,x[i],y[i]);
        for i:=1 to 7 do
        for j:=i+1 to 8 do
                if (x[i]>x[j])or((x[i]=x[j])and(y[i]>y[j])) then
                begin
                        b:=x[i]; x[i]:=x[j]; x[j]:=b;
                        b:=y[i]; y[i]:=y[j]; y[j]:=b;
                end;
         for i:=2 to 3 do if x[i]<>x[i-1] then print;
         for i:=5 to 5 do if x[i]<>x[i-1] then print;
         for i:=7 to 8 do if x[i]<>x[i-1] then print;
         if (x[4]=x[3])or(x[6]=x[5]) then print;
         f:=(y[2]>y[1])and(y[2]<y[3]);
         if not (f) then print;
         f:=(y[7]>y[6])and(y[7]<y[8])and(y[7]=y[2]);
         if not (f) then print;
         f:=(y[3]>y[1])and(y[3]=y[5])and(y[3]=y[8]);
         if not (f) then print;
         f:=(y[1]=y[4])and(y[1]=y[6]);
         if not (f) then print;
         write(g,'respectable');
        Close(fg);Close(g);
END.

Program cf194bb;
Var
  i,j,temp:Longint;
  x,y:Array[0..10] Of Longint;
Begin
  For i:=1 To 8 Do Readln(x[i],y[i]);
  For i:=1 To 8 Do
    For j:=i+1 To 8 Do Begin
      If (x[j]<x[i]) Or ((x[j]=x[i])And(y[j]<y[i])) Then Begin
        temp:=x[i];x[i]:=x[j];x[j]:=temp;
        temp:=y[i];y[i]:=y[j];y[j]:=temp;
      End;
    End;
  If (x[1]=x[2])And(x[2]=x[3])And(x[3]<x[4])And(x[4]=x[5])And(x[5]<x[6])And(x[6]=x[7])And(x[7]=x[8])
  And(y[1]<y[2])And(y[2]<y[3])And(y[4]=y[1])And(y[5]=y[3])And(y[6]=y[1])And(y[7]=y[2])And(y[8]=y[3]) Then Writeln('respectable') Else WRiteln('ugly');
End.

var i, b, c, d, x, y, z, l, l1, k, q, w, j: longint;
    a: array [1..8, 1..2] of longint;
begin
  for i := 1 to 8 do
  begin
    read(a[i, 1], a[i, 2]);
    if i = 1 then
    begin
      b := a[i, 1];
    end
    else
    begin
      if (a[i, 1] <> b) and(l = 0) then
      begin
        c := a[i, 1];
        l := 1;
      end
      else
      if (l = 1) and(a[i, 1] <> c)and(a[i, 1] <> b) then
      begin
        d := a[i, 1];
        l := 2;
      end
      else
      if (l = 2) then
      begin
        if (a[i, 1] = b) or (a[i, 1] = c) or (a[i, 1] = d) then else k := 1;
      end;
    end;
    if i = 1 then
    begin
      x := a[i, 2];
    end
    else
    begin
      if (a[i, 2] <> x) and (l1 = 0) then
      begin
        y := a[i, 2];
        l1 := 1;
      end
      else
      if (l1 = 1) and (a[i, 2] <> y)and(a[i, 2] <> x) then
      begin
        z := a[i, 2];
        l1 := 2;
      end
      else
      if (l1 = 2) then
      begin
        if (a[i, 2] = x) or (a[i, 2] = y) or (a[i, 2] = z) then else  k := 1;
      end;
    end;

  end;
  if l *l1 = 4 then
  begin
    if ((b < d) and (b > c) )or((b < c)and(b > d)) then q:=b;
    if ((c < d) and (c > b) )or((c < b)and(c > d)) then q:=c;
    if ((d < b) and (d > c) )or((d < c)and(d > b)) then q:=d;
    if ((x < z) and (x > y) )or((x < y)and(x > z)) then w:=x;
    if ((y < z) and (y > x) )or((y < x)and(y > z)) then w:=y;
    if ((z < x) and (z > y) )or((z < y)and(z > x)) then w:=z;
  end
  else k:= 1;
  for i:=1 to 8 do
  begin

    if (a[i, 1] = q) and(a[i, 2]= w) then k:= 1;
    for j := 1 to 8 do
    if(i <>j)and(a[i, 1]= a[j, 1])and(a[i, 2] = a[j, 2]) then k := 1;
  end;
  if (l1*l <> 4) then k := 1;
  if k = 1 then write('ugly') else write('respectable');
end.

var	i, j, t,m: longInt;
	x, y: array[ 1..8 ] of longInt;

begin
	for i := 1 to 8 do
		readln( x[i], y[i] );

	for i := 1 to 8 do
		for j := i + 1 to 8 do
			if ( x[j] < x[i] ) or ( ( x[j] = x[i] ) and ( y[j] < y[i] ) ) then
			begin
				t := x[i];
				x[i] := x[j];
				x[j] := t;

				t := y[i];
				y[i] := y[j];
				y[j] := t;
			end;

	if ( x[1] = x[2] ) and ( x[2] = x[3] ) and ( x[3] < x[4] ) and ( x[4] = x[5] ) and ( x[5] < x[6] ) and ( x[6] = x[7] ) and ( x[7] = x[8] ) and ( y[1] < y[2] ) and ( y[2] < y[3] ) and ( y[4] = y[1] ) and ( y[5] = y[3] ) and ( y[6] = y[1] ) and ( y[7] = y[2] ) and ( y[8] = y[3] ) then
		writeln( 'respectable' )
	else
		writeln( 'ugly' );
end.

program problem2;

var	i, j, t: longInt;
	x, y: array[ 1..8 ] of longInt;

begin
	for i := 1 to 8 do
		readln( x[i], y[i] );

	for i := 1 to 8 do
		for j := i + 1 to 8 do
			if ( x[j] < x[i] ) or ( ( x[j] = x[i] ) and ( y[j] < y[i] ) ) then
			begin
				t := x[i];
				x[i] := x[j];
				x[j] := t;

				t := y[i];
				y[i] := y[j];
				y[j] := t;
			end;

	if ( x[1] = x[2] ) and ( x[2] = x[3] ) and ( x[3] < x[4] ) and ( x[4] = x[5] ) and ( x[5] < x[6] ) and ( x[6] = x[7] ) and ( x[7] = x[8] ) and ( y[1] < y[2] ) and ( y[2] < y[3] ) and ( y[4] = y[1] ) and ( y[5] = y[3] ) and ( y[6] = y[1] ) and ( y[7] = y[2] ) and ( y[8] = y[3] ) then
		writeln( 'respectable' )
	else
		writeln( 'ugly' );
end.

var
q:longint;
w,e,r,t,u,kx,ky,i,o,p:int64;
a,x,y:array[1..8]of int64;
f1,f2:text;
b1,b2,b3,b4,b5,b6:boolean;

procedure sw(var b,n:int64);
var m:int64;
begin
m:=b; b:=n; n:=m;
end;

procedure qs(l,r:int64);
var l2,r2,b:int64;
begin
l2:=l; r2:=r;
b:=a[r];
while l2<r2 do
        begin
        while a[l2]<b do inc(l2);
        while a[r2]>b do dec(r2);
        if l2<=r2 then
                begin
                sw(a[r2],a[l2]);
                sw(x[r2],x[l2]);
                sw(y[l2],y[r2]);
                inc(l2); dec(r2);
                end;
        end;
if l<r2 then qs(l,r2);
if l2<r then qs(l2,r);
end;

begin
//assign(f1,'input.txt'); reset(f1); assign(f2,'output.txt'); rewrite(f2);

for q:=1 to 8 do
        begin
        read(x[q],y[q]);
        a[q]:=x[q]*10000000+y[q];
        end;
qs(1,8);
//for q:=1 to 8 do writeln(a[q],' ',x[q],' ',y[q]);
b1:=(x[1]=x[2])and(x[1]=x[3])and(x[1]<x[4]);
b2:=(x[5]=x[4])and(x[5]<x[6]);
b3:=(x[6]=x[7])and(x[7]=x[8]);

b4:=(y[1]=y[4])and(y[4]=y[6])and(y[2]>y[1]);
b5:=(y[2]=y[7])and(y[7]<y[3]);
b6:=(y[3]=y[5])and(y[3]=y[8]);
if b1 and b2 and b3 and b4 and b5 and b6 then
        writeln('respectable') else writeln('ugly');
//close(f1); close(f2);
end.

var
  tot,i,n,l1,l2,t,j:longint;
  x1,y1:array[1..100]of longint;
  f:array[0..1000000]of boolean;
  x,y:array[1..20]of longint;
begin
  n:=8;
  for i:=1 to n do
    readln(x[i],y[i]);
  for i:=1 to n do
    for j:=1 to n do
      if i<>j then
      if (x[i]=x[j])and(y[i]=y[j]) then
        begin
          writeln('ugly');
          exit;
        end;
  for i:=1 to n do
    if f[x[i]]=false then
      begin
        f[x[i]]:=true;
        inc(tot);
        if tot>3 then
          begin
            writeln('ugly');
            exit;
          end;
        inc(l1);
        x1[l1]:=x[i];
      end;
  tot:=0;
  fillchar(f,sizeof(f),false);
  for i:=1 to n do
    if f[y[i]]=false then
      begin
        f[y[i]]:=true;
        inc(tot);
        if tot>3 then
          begin
           writeln('ugly');
           exit;
          end;
        inc(l2);
        y1[l2]:=y[i];
      end;
   for i:=1 to 2 do
     for j:=i+1 to 3 do
       if x1[j]>x1[i] then
         begin
           t:=x1[j];
           x1[j]:=x1[i];
           x1[i]:=t;
         end;
   for i:=1 to 2 do
     for j:=i+1 to 3 do
       if y1[j]>y1[i] then
         begin
           t:=y1[j];
           y1[j]:=y1[i];
           y1[i]:=t;
         end;
   tot:=0;
   for i:=1 to n do
     if (x[i]=x1[2]) then inc(tot);
   if tot<>2 then writeln('ugly') else
      begin
           tot:=0;
           for i:=1 to n do
             if (y[i]=y1[2]) then
               inc(tot);
           if tot<>2 then writeln('ugly')
              else writeln('respectable');
      end;
    { begin
       tot:=0;
       for i:=1 to n do
         if x[i]=x1[1] then
           inc(tot);
       if tot<>3 then writeln('ugly') else
         begin
           tot:=0;
           for i:=1 to n do
             if (y[i]=y1[2]) then
               inc(tot);
           if tot<>2 then writeln('ugly')
           else
             begin
               tot:=0;
               for i:=1 to n do
                 if (y[i]=y1[1]) then
                   inc(tot);
               if tot<>3 then writeln('ugly') else writeln('respectable');
             end;
         end;
     end;    }
end.

uses math;
type mass=array[1..8,1..2] of integer;
     maxx=array[1..12] of integer;
     majj=array[1..8] of boolean;
var d,x,y,kol,p,q,l1,r1,q1,q2,k,uk,min1,e,e1,n,kolv,res,r,l,b,c,max1:int64;s,s1,s2:string;i:integer;
   ch,ce:char;u:boolean;qq,w,o,g,a:int64;m,m3,t,h:mass;v,z,j:integer;m1:maxx;m2:majj;
procedure qsort(var A:mass);
   procedure sort(l,r:integer);
     var i,j,x,w,x1,y: integer;
   begin
     i := l;
     j := r;
     w:=l+random(r-l);
     x := A[w,1];
     x1:=a[w,2];
     repeat
       while (A[i,1] < x) or ((a[i,1]=x) and (a[i,2]<x1)) do inc(i);
       while (x < A[j,1]) or ((a[j,1]=x) and (a[j,2]>x1)) do dec(j);
       if not (i>j) then
         begin
           y    := A[i,1];
           A[i,1] := A[j,1];
           A[j,1] := y;
           y:=a[i,2];
           a[i,2]:=a[j,2];
           a[j,2]:=y;
           inc(i);
           dec(j);
         end;
     until i>j;
     if l < j then sort(l,j);
     if i < r then sort(i,r);
   end;
begin
 sort(1,8);
end;
begin
//  assign(input,'input.txt');
//  assign(output,'output.txt');
  for i:=1 to 8 do
    readln(m[i,1],m[i,2]);
  qsort(m);
  a:=0;
  i:=1;
  for i:=2 to 8 do
     if m[i,1]<>m[i-1,1]
     then inc(a);
  for i:=2 to 8 do
     if (m[i,1]=m[i-1,1]) and (m[i,2]=m[i-1,2])
     then Begin
             writeln('ugly');
             halt(0);
          end;
  if a<>2
  then Begin
        writeln('ugly');
        halt(0);
       end;
  m1[1]:=1;
  a:=1;
  for j:=2 to 8 do
     Begin
        if m[j,1]<>m[j-1,1]
        then inc(a);
        inc(m1[a]);
     end;
  if not ((m1[1]=3) and (m1[2]=2) and (m1[3]=3))
  then BEgin
         writeln('ugly');
         halt(0);
       end;
  for z:=1 to 8 do
     Begin
        a:=0;
        for j:=z to 8 do
          if m[j,1]=m[z,1]
          then inc(a);
        if a>3
        then BEgin
                writeln('ugly');
                halt(0);
             end;
        if a=3
        then Begin
                a:=0;
                for j:=z to 8 do
                   if m[j,1]=m[z,1]
                   then Begin
                          inc(a);
                          m1[a]:=m[j,2];
                        end;
                break;
             end;
     end;
  fillchar(m2,sizeof(m2),true);
  for z:=1 to 8 do
     Begin
        if m2[z]=false
        then continue;
        a:=0;
        for j:=z to 8 do
          if m[j,1]=m[z,1]
          then inc(a);
        if a>3
        then BEgin
                writeln('ugly');
                halt(0);
             end;
        if a=2
        then Begin
               a:=1;
               for j:=z to 8 do
                  if m[j,1]=m[z,1]
                  then Begin
                          if m[j,2]<>m1[a]
                          then Begin
                                  writeln('ugly');
                                  halt(0);
                               end;
                          inc(a,2);
                          m2[j]:=false;
                       end;
             end
        else if a=3
             then Begin
                     a:=1;
                     for j:=z to 8 do
                        if m[j,1]=m[z,1]
                        then Begin
                                if m[j,2]<>m1[a]
                                then Begin
                                        writeln('ugly');
                                        halt(0);
                                     end;
                                inc(a);
                                m2[j]:=false;
                             end;
                  end
             else Begin
                     writeln('ugly');
                     halt(0);
                  end;
     end;
   writeln('respectable');
end.

Const Finp='';
      Fout='';
Var n:longint;
    x,y:array[1..8] of longint;

Procedure Nhap;
Var f:Text;
    i:longint;
Begin
    assign(f,finp); reset(f);
    n:=8;
    for i:=1 to n do
        readln(f,x[i],y[i]);
    close(f);
End;
Procedure Trao(var x,y:longint);
Var temp:longint;
Begin
    temp:=x;
    x:=y;
    y:=temp;
End;
Procedure Sort;
Var i,j:longint;
Begin
    for i:=1 to n-1 do
        for j:=i+1 to n do
            if (y[i]<y[j]) or ((y[i]=y[j]) and (x[i]>x[j])) then
                begin
                    trao(x[i],x[j]);
                    trao(y[i],y[j]);
                end;
End;
Procedure Xuat;
Var f:Text;
Begin
    assign(f,fout); rewrite(f);
    if ((x[1]=x[4]) and (x[4]=x[6])) and (x[2]=x[7]) and ((x[3]=x[5]) and (x[5]=x[8])) and ((y[1]=y[2]) and (y[2]=y[3])) and (y[4]=y[5]) and ((y[6]=y[7]) and (y[7]=y[8])) and (y[1]<>y[4]) and (y[4]<>y[6]) then
        write(f,'respectable')
    else
        write(f,'ugly');
    close(f);
End;

Begin
    nhap;
    sort;
    xuat;
End.

const n = 8;
var i,j, ans: LongInt;
x,y: array[1..8] of LongInt;
res: Boolean;
begin
  for i:=1 to n do Readln(x[i],y[i]);

  for i:=1 to n do
  begin
    for j:=1 to n do
    if i<>j then
    if (x[i]=x[j]) and (y[i]=y[j]) then
    begin
      Writeln('ugly');
      halt(0);
    end;
  end;

  for i:=1 to n-1 do
  begin
    for j:=i+1 to n do
    if (x[j]<x[i]) or (x[j]=x[i]) and (y[j]<y[i]) then
    begin
      ans:=x[j];
      x[j]:=x[i];
      x[i]:=ans;

      ans:=y[j];
      y[j]:=y[i];
      y[i]:=ans;
    end;
  end;

  res:=false;

  if (abs(y[3]-y[1])=abs(y[5]-y[4])) and (abs(x[5]-x[4])=abs(x[8]-x[6])) and (x[1]=x[2]) and (x[2]=x[3]) and (x[3]<>x[4]) and (x[4]=x[5]) and (x[5]<>x[6]) and (x[6]=x[7]) and (x[7]=x[8])
  then res:=true;

  for i:=1 to n-1 do
  begin
    for j:=i+1 to n do
    if (y[j]<y[i]) or (y[j]=y[i]) and (x[j]<x[i]) then
    begin
      ans:=y[j];
      y[j]:=y[i];
      y[i]:=ans;

      ans:=x[j];
      x[j]:=x[i];
      x[i]:=ans;
    end;
  end;

  if res and (abs(x[3]-x[1])=abs(x[5]-x[4])) and (abs(y[5]-y[4])=abs(y[8]-y[6])) and (y[1]=y[2]) and (y[2]=y[3]) and (y[3]<>y[4]) and (y[4]=y[5]) and (y[5]<>y[6]) and (y[6]=y[7]) and (y[7]=y[8]) then
  Writeln('respectable') else Writeln('ugly');
end.

type    qw = record
        x,y : longint;
end;

var     a : array[1..8] of qw;
        i,jx,jy : longint;

procedure  sortx(l,r : longint);
 var    i,j,xt : longint;
        tmp : qw;
 begin
        i := l;
        j := r;
        xt := a[(l+r) div 2].x;
        repeat
                while a[i].x < xt do inc(i);
                while a[j].x > xt do dec(j);
                if i <= j then begin
                        tmp := a[i];
                        a[i] := a[j];
                        a[j] := tmp;
                        inc(i);
                        dec(j);
                end;
        until   i > j;
        if l < j then sortx(l,j);
        if i < r then sortx(i,r);
 end;

procedure  sorty(l,r : longint);
 var    i,j,xt : longint;
        tmp : qw;
 begin
        i := l;
        j := r;
        xt := a[(l+r) div 2].y;
        repeat
                while a[i].y < xt do inc(i);
                while a[j].y > xt do dec(j);
                if i <= j then begin
                        tmp := a[i];
                        a[i] := a[j];
                        a[j] := tmp;
                        inc(i);
                        dec(j);
                end;
        until   i > j;
        if l < j then sorty(l,j);
        if i < r then sorty(i,r);
 end;

procedure thoat;
 begin
        writeln('ugly');
        halt;
 end;

begin
        for i := 1 to 8 do
                readln(a[i].x,a[i].y);
        /////////////////////////////
        sortx(1,8);
        jx := 0;
        for i := 1 to 8 do
                if a[i].x = a[1].x then inc(jx);
        if jx <> 3 then thoat;
        jx := 0;
        for i := 1 to 8 do
                if a[i].x = a[4].x then inc(jx);
        if jx <> 2 then thoat;
        jx := 0;
        for i := 1 to 8 do
                if a[i].x = a[6].x then inc(jx);
        if jx <> 3 then thoat;
        /////////////////////////
        for i := 1 to 7 do
                if (a[i].x = a[i+1].x) and (a[i].y = a[i+1].y) then thoat;

        /////////////////////////
        sorty(1,8);
        jy := 0;
        for i := 1 to 8 do
                if a[i].y = a[1].y then inc(jy);
        if jy <> 3 then thoat;
        jy := 0;
        for i := 1 to 8 do
                if a[i].y = a[4].y then inc(jy);
        if jy <> 2 then thoat;
        jy := 0;
        for i := 1 to 8 do
                if a[i].y = a[6].y then inc(jy);
        if jy <> 3 then thoat;
        ///////////////////////
        for i := 1 to 7 do
                if (a[i].x = a[i+1].x) and (a[i].y = a[i+1].y) then thoat;
        //////////////////////
        writeln('respectable');
end.

Var x,y,xx,yy,b:array [0..100] of longint;
  i,t,tt,k1,k2,j,p:longint;
  f1,f2,f:array [0..2000000] of boolean;

 procedure sort(l,r: longint);
      var
         i,j,xx,yy,z: longint;
      begin
         i:=l;
         j:=r;
         xx:=x[(l+r) div 2];
         z:=y[(l+r) div 2];
         repeat
           while (x[i]<xx) or ((x[i]=xx)and (y[i]<z)) do
            inc(i);
           while (xx<x[j]) or ((xx=x[j]) and (z<y[j])) do
            dec(j);
           if not(i>j) then
             begin
                yy:=x[i];
                x[i]:=x[j];
                x[j]:=yy;

                yy:=y[i];
                y[i]:=y[j];
                y[j]:=yy;

                inc(i);
                j:=j-1;
             end;
         until i>j;
         if l<j then
           sort(l,j);
         if i<r then
           sort(i,r);
      end;

  begin
  fillchar(f1,sizeof(f1),true);
  fillchar(f2,sizeof(f2),true);
    fillchar(f,sizeof(f),true);
    for i:=1 to 8 do
     begin
      read(x[i],y[i]);
     end;
   sort(1,8);
   for i:=1 to 8 do
    begin
      if f1[x[i]] then begin f1[x[i]]:=false; inc(k1); xx[k1]:=x[i]; end;
     if f2[y[i]] then begin f2[y[i]]:=false; inc(k2); yy[k2]:=y[i]; end;
     end;
    if (k1=k2) and (k1=3) then begin
   for i:=1 to k1 do
    for j:=1 to k2 do
     begin
       for p:=1 to 8 do
        begin
          if (x[p]=xx[i]) and (yy[j]=y[p]) then begin if (i=2) and (j=2) then f[p]:=true else f[p]:=false;
          break;end;
        end;
     end;
     for i:=1 to 8 do
     if(f[i])then begin writeln('ugly'); halt; end;
     writeln('respectable');
     end
     else writeln('ugly');
  end.

var x,y:array[1..8]of longint;q,i,j:longint;
begin
for i:=1 to 8 do
read(x[i],y[i]);
for i:=1 to 8 do
 for j:=i+1 to 8 do
  begin
   if (x[j]<x[i])or((x[j]=x[i])and(y[j]<y[i]))then
    begin
     q:=x[i];    x[i]:=x[j];    x[j]:=q;
     q:=y[i];    y[i]:=y[j];    y[j]:=q;
    end;
  end;
 if (x[1]=x[2])and(x[2]=x[3])and(x[3]<x[4])and(x[4]=x[5])and(x[5]<x[6])and
    (x[6]=x[7])and(x[7]=x[8])and(y[1]<y[2])and(y[2]<y[3])and(y[4]=y[1])and
    (y[5]=y[3])and(y[6]=y[1])and(y[7]=y[2])and(y[8]=y[3])then  write('respectable')
 else write('ugly');
end.

var
  i, j, k, n, a, b, maxx, maxy, minx, miny, s: longint;
  x, y: array[1..10] of longint;
  f:boolean;

begin
  n := 8;
  for i := 1 to n do read(x[i], y[i]);
 for k:=1 to n do
  for i := 1 to n do
    for j := 1 to n do
      if (y[i] < y[j]) or ((y[i] = y[j]) and (x[i] < x[j])) then
      begin a := y[i]; y[i] := y[j]; y[j] := a; b := x[i]; x[i] := x[j]; x[j] := b; end;

 f:=true;
 if
  (y[1]<>y[2]) or (y[2]<>y[3]) or (y[4]<>y[5]) or (y[6]<>y[7]) or (y[7]<>y[8])
or(x[1]<>x[4]) or (x[4]<>x[6]) or (x[2]<>x[7]) or (x[3]<>x[5]) or (x[5]<>x[8])
then f:=false;

  for i:=1 to n do
   for j:=1 to n do
   if i<>j then
    if (x[i]=x[j]) and (y[i]=y[j]) then f:=false;
  if f then writeln('respectable') else writeln('ugly');

end.

type
    point=record
              x,y:longint;
          end;
var a:array[1..8]of point;

procedure iput;
var i:byte;
begin
    for i:=1 to 8 do
        readln(a[i].x,a[i].y);
end;

procedure sort(l,r:byte);
var p,q:byte;
    z,temp:point;
begin
    p:=l;
    q:=r;
    z:=a[p+random(q-p)];
    while p<q do begin
        while (z.x>a[p].x)or((z.x=a[p].x)and(z.y>a[p].y)) do
            inc(p);
        while (a[q].x>z.x)or((a[q].x=z.x)and(a[q].y>z.y)) do
            dec(q);
        if p<=q then begin
            temp:=a[p];
            a[p]:=a[q];
            a[q]:=temp;
            inc(p);
            dec(q);
        end;
    end;
    if l<q then sort(l,q);
    if p<r then sort(p,r);
end;

function check:boolean;
var c1,c2:boolean;
begin
    c1:=(a[1].x=a[2].x)and(a[2].x=a[3].x)and(a[3].x<a[4].x)and(a[4].x=a[5].x)and(a[5].x<a[6].x)and(a[6].x=a[7].x)and(a[7].x=a[8].x);
    c2:=(a[1].y=a[4].y)and(a[4].y=a[6].y)and(a[6].y<a[2].y)and(a[2].y=a[7].y)and(a[7].y<a[3].y)and(a[3].y=a[5].y)and(a[5].y=a[8].y);
    check:=c1 and c2;
end;

begin
    iput;
    sort(1,8);
    if check then
        writeln('respectable')
    else
        writeln('ugly');
    readln;
end.

var
x,y:array [1..8] of longint;
i,j,p:longint;
begin
for i:=1 to 8 do
   readln (x[i],y[i]);
for i:=1 to 8 do
   for j:=i+1 to 8 do
      begin
         if (x[j]<x[i]) or ((x[j]=x[i]) and (y[j]<y[i])) then
            begin
               p:=x[i];
               x[i]:=x[j];
               x[j]:=p;
               p:=y[i];
               y[i]:=y[j];
               y[j]:=p;
            end;
      end;
if (x[1]=x[2]) and (x[2]=x[3]) and (x[3]<x[4]) and (x[4]=x[5]) and (x[5]<x[6]) and (x[6]=x[7]) and (x[7]=x[8]) and (y[1]<y[2]) and (y[2]<y[3]) and (y[4]=y[1]) and (y[5]=y[3]) and (y[6]=y[1]) and (y[7]=y[2]) and (y[8]=y[3]) then
   write ('respectable')
else
   write ('ugly');
end.

var i,j,aa,bb,temp,p:longint;
    x,y,a,b:array[1..100] of longint;
begin
 for i:=1 to 8 do
  begin
   readln(x[i],y[i]);
   p:=1;
   for j:=1 to aa do
    if a[j]=x[i] then p:=0;
   if p=1 then begin aa:=aa+1;a[aa]:=x[i];end;
   p:=1;
   for j:=1 to bb do
    if b[j]=y[i] then p:=0;
   if p=1 then begin bb:=bb+1;b[bb]:=y[i];end;
  end;
 p:=1;
 if (aa=3)and(bb=3) then
  begin
   for i:=1 to aa-1 do
    for j:=aa-1 downto i do
     if a[j]>a[j+1] then begin temp:=a[j];a[j]:=a[j+1];a[j+1]:=temp;end;
   for i:=1 to bb-1 do
    for j:=bb-1 downto i do
     if b[j]>b[j+1] then begin temp:=b[j];b[j]:=b[j+1];b[j+1]:=temp;end;
   p:=0;
   for i:=1 to 8 do
    if (a[2]=x[i])and(b[2]=y[i]) then p:=1;
   for i:=1 to 8 do
    for j:=i+1 to 8 do
     if (x[i]=x[j])and(y[i]=y[j]) then p:=1;
  end;
 if p=1 then writeln('ugly') else writeln('respectable');
end.

const fn = '';
      gx = '';
var x,y : array[0..8] of longint;
procedure nhap;
var f : text;
    i : longint;
begin
    assign(f,fn); reset(f);
    for i := 1 to 8 do
        readln(f,x[i],y[i]);
    close(f);
end;
procedure sort;
var i,j,k : longint;
begin
    x[0] := 0; y[0] := 0;
    for j := 2 to 8 do
    begin
        i := j;
        while x[i] < x[i-1] do
        begin
            k := x[i]; x[i] := x[i-1]; x[i-1] := k;
            k := y[i]; y[i] := y[i-1]; y[i-1] := k;
            dec(i);
        end;
        while (x[i] = x[i-1]) and (y[i] < y[i-1]) do
        begin
            k := y[i]; y[i] := y[i-1]; y[i-1] := k;
            dec(i);
        end;
    end;
end;
function xuli : boolean;
var i : longint;
begin
    sort;
    for i := 2 to 3 do if x[i] <> x[i-1] then exit(false);
    for i := 2 to 3 do if y[i] <= y[i-1] then exit(false);
    if (x[4] <> x[5]) or (x[4] <= x[1]) then exit(false);
    if (y[4] <> y[1]) or (y[5] <> y[3]) then exit(false);
    for i := 6 to 8 do
        if y[i] <> y[i-5]  then exit(false);
    if x[6] <= x[5] then exit(false);
    for i := 7 to 8 do
        if x[i] <> x[i-1] then exit(false);
    exit(true);
end;
procedure xuat;
var g : text;
begin
    assign(g,gx); rewrite(g);
    if xuli = true then writeln(g,'respectable')
    else writeln(g,'ugly');
    close(g);
end;
begin
    nhap;
    xuat;
end.

type rec=record x,y:longint;end;
var
  a:array[1..8] of rec;
  b:array[1..3,1..3] of boolean;
  n,i,j,k:longint;
  t:rec;
function yes:string;
var
  i,j,k:longint;
  p:array[1..6] of rec;
begin
  fillchar(b,sizeof(b),0);
  b[2,2]:=true;
  p[1].x:=a[1].x;p[1].y:=1;
  p[2].x:=a[4].x;p[2].y:=2;
  p[3].x:=a[6].x;p[3].y:=3;
  p[4].x:=a[1].y;p[4].y:=1;
  p[5].x:=a[2].y;p[5].y:=2;
  p[6].x:=a[3].y;p[6].y:=3;
  for i:=1 to 2 do
    if p[i].x=p[i+1].x then exit('ugly');
  for i:=4 to 5 do
    if p[i].x=p[i+1].x then exit('ugly');
  for i:=1 to 8 do
    begin
      for j:=1 to 3 do if a[i].x=p[j].x then break;
      for k:=4 to 6 do if a[i].y=p[k].x then break;
      b[j,k-3]:=true;
    end;
  for i:=1 to 3 do
    for j:=1 to 3 do
      if not b[i,j] then exit('ugly');
  exit('respectable');
end;
begin
  for i:=1 to 8 do readln(a[i].x,a[i].y);
  for i:=1 to 7 do
    for j:=i+1 to 8 do
      if (a[i].x>a[j].x)or(a[i].x=a[j].x)and(a[i].y>a[j].y) then
        begin
          t:=a[i];
          a[i]:=a[j];
          a[j]:=t;
        end;
  writeln(yes);
end.

var
        n,m,p,xx,xx2,yy,yy2,k,l,i,j,max,min,z,sum,res,x2,y2,b,r,g,q,e : longint;
        a,d : array [0..1000000] of longint;
        s : array [0..1000,0..1000] of longint;
        ans: int64;
        h : boolean;

begin
  for i:=1 to 8 do
  read(a[i],d[i]);
  for i:=1 to 8 do
    for j:=i+1 to 8 do begin
      if (a[j]<a[i]) or ((a[j]=a[i]) and (d[j]<d[i])) then begin
         q:=a[i];
         a[i]:=a[j];
         a[j]:=q;
         q:=d[i];
         d[i]:=d[j];
         d[j]:=q;
       end;
    end;
    if (a[1]=a[2]) and (a[2]=a[3]) and (a[3]<a[4]) and (a[4]=a[5]) and (a[5]<a[6]) and
       (a[6]=a[7]) and (a[7]=a[8]) and (d[1]<d[2]) and (d[2]<d[3]) and (d[4]=d[1]) and
       (d[5]=d[3]) and (d[6]=d[1]) and (d[7]=d[2]) and (d[8]=d[3]) then  writeln('respectable')
    else writeln('ugly');
  end.

const
        fi = '';
var
        a : array[1..2,1..8] of longint;
        i,j,p,x,y,z : longint;
        b : array[0..1000000] of longint;

procedure loi;
begin
        writeln('ugly');
        halt;
end;

begin
        assign(input,fi);
        reset(input);
        for i := 1 to 8 do
                readln(a[1,i],a[2,i]);
        close(input);
        for i := 1 to 7 do
                for j := i+1 to 8 do
                        if (a[1,i] > a[1,j]) then
                        begin
                                p := a[1,i];
                                a[1,i] := a[1,j];
                                a[1,j] := p;
                                p := a[2,i];
                                a[2,i] := a[2,j];
                                a[2,j] := p;
                        end;
        for i := 1 to 7 do
                for j := i+1 to 8 do
                        if (a[1,i] =  a[1,j]) and (a[2,i] > a[2,j]) then
                        begin
                                p := a[1,i];
                                a[1,i] := a[1,j];
                                a[1,j] := p;
                                p := a[2,i];
                                a[2,i] := a[2,j];
                                a[2,j] := p;
                        end;
        for i := 1 to 7 do
                for j := i+1 to 8 do
                        if (a[1,i]=a[1,j]) and (a[2,i]=a[2,j]) then loi;

        for i := 1 to 8 do
                inc(b[a[1,i]]);
        for i := 0 to 1000000 do
        begin
                if (b[i]<>0) and (x=0) then x := b[i]
                else if (b[i]<>0) and (y=0) then y := b[i]
                     else if (b[i]<>0) and(z=0) then z := b[i];
        end;
        if x<>3 then loi;
        if y<>2 then loi;
        if z<>3 then loi;
        fillchar(b,sizeof(b),0);
        for i := 1 to 8 do
                inc(b[a[2,i]]);
        x := 0;
        y := 0;
        z := 0;
        for i := 0 to 1000000 do
        begin
                if (b[i]<>0) and (x=0) then x := b[i]
                else if (b[i]<>0) and (y=0) then y := b[i]
                     else if (b[i]<>0) and(z=0) then z := b[i];
        end;
        if x<>3 then loi;
        if y<>2 then loi;
        if z<>3 then loi;
        writeln('respectable');
end.

var n,i,j,t,tt:longint;
ff:boolean;
a,b,f,f1:array [0..10] of longint;
c,c1:array [0..2000000] of boolean;
begin
//assign(input,'bdj.in');reset(input);
//assign(output,'bdj.out');rewrite(output);
n:=8;
for i:=1 to n do
  begin
  readln(a[i],b[i]);
  c[a[i]]:=true;c1[b[i]]:=true;
  end;
for i:=0 to 2000000 do
  if c[i] then
    begin
    inc(t);f[t]:=i;
    end;
for i:=0 to 2000000 do
  if c1[i] then
    begin
    inc(tt);f1[tt]:=i;
    end;
for i:=1 to n do
  if (a[i]=f[2]) and (b[i]=f1[2]) then
    ff:=true;
for i:=1 to n do
  for j:=i-1 downto 1 do
    if (a[i]=a[j]) and (b[i]=b[j]) then
      ff:=true;
if (t<>3) or ff or (tt<>3) then writeln('ugly')
else writeln('respectable');
close(input);close(output);
end.

Var x,y,xx,yy,b:array [0..10] of longint;
  i,t,tt,k1,k2,j,p:longint;
  f1,f2,f:array [0..2000000] of boolean;

 procedure sort(l,r: longint);
      var
         i,j,xx,yy,z: longint;
      begin
         i:=l;
         j:=r;
         xx:=x[(l+r) div 2];
         z:=y[(l+r) div 2];
         repeat
           while (x[i]<xx) or ((x[i]=xx)and (y[i]<z)) do
            inc(i);
           while (xx<x[j]) or ((xx=x[j]) and (z<y[j])) do
            dec(j);
           if not(i>j) then
             begin
                yy:=x[i];
                x[i]:=x[j];
                x[j]:=yy;

                yy:=y[i];
                y[i]:=y[j];
                y[j]:=yy;

                inc(i);
                j:=j-1;
             end;
         until i>j;
         if l<j then
           sort(l,j);
         if i<r then
           sort(i,r);
      end;

  begin
  fillchar(f1,sizeof(f1),true);
  fillchar(f2,sizeof(f2),true);
    fillchar(f,sizeof(f),true);
    for i:=1 to 8 do
     begin
      read(x[i],y[i]);
     end;
   sort(1,8);
   for i:=1 to 8 do
    begin
      if f1[x[i]] then begin f1[x[i]]:=false; inc(k1); xx[k1]:=x[i]; end;
     if f2[y[i]] then begin f2[y[i]]:=false; inc(k2); yy[k2]:=y[i]; end;
     end;
    if (k1=k2) and (k1=3) then begin
   for i:=1 to k1 do
    for j:=1 to k2 do
     begin
       for p:=1 to 8 do
        begin
          if (x[p]=xx[i]) and (yy[j]=y[p]) then begin if (i=2) and (j=2) then f[p]:=true else f[p]:=false;
          break;end;
        end;
     end;
     for i:=1 to 8 do
     if(f[i])then begin writeln('ugly'); halt; end;
     writeln('respectable');
     end
    else writeln('ugly');
  end.

uses math;
const
  fi='';
  fo='';
var
  n:longint;
  f:text;
  x,y:array[0..9] of longint;
  i,j,maxx,maxy,minx,miny,count:longint;
  t1,t2,t3,t4,t5,t6,t:boolean;
begin
  assign(f,fi);reset(f);
  n:=8;
  read(f,x[1],y[1]);
    maxx:=x[1];
    minx:=x[1];
    maxy:=y[1];
    miny:=y[1];
  for i:=2 to n do
    begin
    read(f,x[i],y[i]);
    maxx:=max(maxx,x[i]);
    minx:=min(minx,x[i]);
    maxy:=max(maxy,y[i]);
    miny:=min(miny,y[i]);
    end;
  t1:=false;t2:=false;t3:=false;t4:=false;
  for i:=1 to n do
    begin
      if (x[i]=maxx) and (y[i]=maxy) then t1:=true;
      if (x[i]=minx) and (y[i]=miny) then t2:=true;
      if (x[i]=maxx) and (y[i]=miny) then t3:=true;
      if (x[i]=minx) and (y[i]=maxy) then t4:=true;
    end;
  t5:=false;
  t6:=false;
  for i:=minx+1 to maxx-1 do
    begin
    count:=0;
    for j:=1 to 8 do
      if (x[j]=i) and ( (y[j]=miny) or (y[j]=maxy) ) then
        inc(count);
    if count=2 then t5:=true;
    end;
  for i:=miny+1 to maxy-1 do
    begin
      count:=0;
      for j:=1 to 8 do
        if (y[j]=i) and ( (x[j]=minx) or (x[j]=maxx) ) then
          inc(count);
      if count=2 then t6:=true;
    end;
    t:=t1 and t2 and t3 and t4 and t5 and t6;
  if t=true then writeln('respectable') else writeln('ugly');
end.

{$MODE OBJFPC}
program B194;
const
  maxXY = Round(1E6);
var
  i,j,k: Integer;
  m1,m2: Integer;
  count: Integer;
  x,y,x1,y1: array [1..8] of Integer;
  frx,fry: array [0..maxXY] of Boolean;
  fr: array [1..3,1..3] of Boolean;

begin
  assign(input,''); reset(input);
  assign(output,''); rewrite(output);
  FillChar(frx,SizeOf(frx),True);
  FillChar(fry,SizeOf(fry),True);
  for i := 1 to 8 do
    begin
      readln(x[i],y[i]);
      frx[x[i]] := False;
      fry[y[i]] := False;
    end;
  for i := 0 to maxXY do
    if not frx[i] then
      begin
        Inc(m1);
        x1[m1] := i;
      end;
  for i := 0 to maxXY do
    if not fry[i] then
      begin
        Inc(m2);
        y1[m2] := i;
      end;
  FillChar(fr,SizeOf(fr),True);
  if (m1 = 3) and (m2 = 3) then
    begin
      for i := 1 to 8 do
        for j := 1 to m1 do
          for k := 1 to m2 do
            if fr[j,k] and (x[i] = x1[j]) and (y[i] = y1[k]) then
              begin
                fr[j,k] := False;
                Inc(count);
              end;
      if fr[2,2] and (count = 8) then writeln('respectable')
      else writeln('ugly')
    end
  else writeln('ugly');
  close(input);
  close(output);
end.

var
 a,b:array[1..8]of longint;
 x,y:array[0..1000000]of longint;
 j,xx,yy,i:longint;

 procedure No;
 begin
  writeln('ugly');
  halt;
 end;

begin
// assign(input,'a.in');reset(input);
 for i:=1 to 8 do
 begin
  readln(a[i],b[i]);
  inc(x[a[i]]);
  inc(y[b[i]]);
 end;
 for i:=1 to 8 do for j:=i+1 to 8 do if (a[i]=a[j]) and (b[i]=b[j]) then No;
 for i:=0 to 1000000 do
 begin
  if (x[i]=1) or (x[i]>3) or (y[i]=1) or (y[i]>3) then No;
  if ((x[i]=2) and (xx<>1)) or ((y[i]=2) and (yy<>1)) then No;
  if x[i]=3 then inc(xx);
  if y[i]=3 then inc(yy);
 end;
 if (xx=2) and (yy=2) then writeln('respectable');
end.

program pasha;
Var n,i,j,f:longint;
    x,y:array[1..8]of longint;
  Begin
    for i:=1 to 8 do
     Read(x[i],y[i]);
    for i:=1 to 7 do
     for j:=i+1 to 8 do
      if (x[i]>x[j])or((x[i]=x[j])and(y[i]>y[j])) then
       begin
         f:=x[i];
         x[i]:=x[j];
         x[j]:=f;
         f:=y[i];
         y[i]:=y[j];
         y[j]:=f
       end;
    for i:=2 to 8 do
     if (x[i]=x[i-1])and(y[i]=y[i-1]) then begin Write('ugly');exit end;
    if (x[1]=x[2])and(x[2]=x[3])and
    (x[4]=x[5])and(x[6]=x[7])and(x[7]=x[8])and
    (y[1]=y[4])and(y[4]=y[6])and
    (y[2]=y[7])and(y[3]=y[5])and(y[5]=y[8])then Write('respectable')
                                           else Write('ugly')
  End.

Program EightPoinSets;
Const fi='';
      fo='';
var f1,f2:text;
    min,mid,max,i,nho,j,b,c,min2,max2,mid2:longint;
    kq:boolean;
    a,t:array[1..3] of longint;
    d:array[1..2,1..8]of longint;
    e,f:array[0..1000000] of boolean;

begin
        assign(f1,fi);
        assign(f2,fo);
        reset(f1);
        rewrite(f2);
        nho:=1;
        kq:=true;
        fillchar(d,sizeof(d),false);
        a[1]:=-1;
        a[2]:=-1;
        a[3]:=-1;
        t[1]:=-1;
        t[2]:=-1;
        t[3]:=-1;
        for i:=1 to 8 do
          begin
               read(f1,b,c);
               d[1,i]:=b;
               d[2,i]:=c;
               for j:=1 to i-1 do
               begin
               if (d[1,j]=d[1,i])and(d[2,j]=d[2,i]) then kq:=false;
               end;
               for j:=1 to 3 do
               begin
               if (a[j]=-1)and (e[b]=false) then
                    begin
                         a[j]:=b;
                         e[b]:=true;
                         break;
                    end;
               end;
                     if (e[b]=false) then kq:=false;
               for j:=1 to 3 do
               begin
               if (t[j]=-1)and (f[c]=false) then
                    begin
                         t[j]:=c;
                         f[c]:=true;
                         break;
                    end;
               end;
               if (f[c]=false) then kq:=false;

          end;
          if (a[1]=-1)  or (a[2]=-1) or (a[3]=-1) or (t[1]=-1)or (t[1]=-1) or (t[1]=-1) then kq:=false;
               if kq=false then
               begin
                        writeln(f2,'ugly');
               end;
          if kq=true then
                begin
                        if (a[1]<a[2])and(a[2]<a[3]) then
                        begin
                        max:=a[3];
                        mid:=a[2];
                        min:=a[1];
                        end;
                        if (a[3]<a[2])and(a[2]<a[1]) then
                        begin
                        max:=a[1];
                        mid:=a[2];
                        min:=a[3];
                        end;
                        if (a[2]<a[3])and (a[3]<a[1]) then
                        begin
                        max:=a[1];
                        mid:=a[3];
                        min:=a[2];
                        end;
                        if (a[1]<a[3])and(a[3]<a[2]) then
                        begin
                        max:=a[2];
                        mid:=a[3];
                        min:=a[1];
                        end;
                        if (a[3]<a[1]) and (a[1]<a[2]) then
                        begin
                        max:=a[2];
                        mid:=a[1];
                        min:=a[3];
                        end;
                        if (a[2]<a[1]) and (a[1]<a[3]) then
                        begin
                        max:=a[3];
                        mid:=a[1];
                        min:=a[2];
                        end;
                        if (t[1]<t[2])and(t[2]<t[3]) then
                        begin
                        max2:=t[3];
                        mid2:=t[2];
                        min2:=t[1];
                        end;
                        if (t[3]<t[2])and(t[2]<t[1]) then
                        begin
                        max2:=t[1];
                        mid2:=t[2];
                        min2:=t[3];
                        end;
                        if (t[2]<t[3])and (t[3]<t[1]) then
                        begin
                        max2:=t[1];
                        mid2:=t[3];
                        min2:=t[2];
                        end;
                        if (t[1]<t[3])and(t[3]<t[2]) then
                        begin
                        max2:=t[2];
                        mid2:=t[3];
                        min2:=t[1];
                        end;
                        if (t[3]<t[1]) and (t[1]<t[2]) then
                        begin
                        max2:=t[2];
                        mid2:=t[1];
                        min2:=t[3];
                        end;
                        if (t[2]<t[1]) and (t[1]<t[3]) then
                        begin
                        max2:=t[3];
                        mid2:=t[1];
                        min2:=t[2];
                        end;
                        for i:=1 to 8 do
                        if d[1,i]=mid then if d[2,i]=mid2 then kq:=false;
                        if kq=false then writeln(f2,'ugly') else
                        writeln(f2,'respectable');
                end;
close(f1);
close(f2);
end.

var
  x,y : array[1..8]of longint;
  k,i,j : longint;
begin
  for i:=1 to 8 do readln(x[i],y[i]);
  for i:=1 to 8 do
  for j:=i+1 to 8 do
    begin
      if (x[j]<x[i])
      or ((x[j]=x[i]) and (y[j]<y[i])) then
        begin
          k:=x[i]; x[i]:=x[j]; x[j]:=k;
          k:=y[i]; y[i]:=y[j]; y[j]:=k;
        end;
    end;
  if  (x[1]=x[2]) and (x[2]=x[3]) and (x[3]<x[4])
  and (x[4]=x[5]) and (x[5]<x[6]) and (x[6]=x[7])
  and (x[7]=x[8]) and (y[1]<y[2]) and (y[2]<y[3])
  and (y[4]=y[1]) and (y[5]=y[3]) and (y[6]=y[1])
  and (y[7]=y[2]) and (y[8]=y[3]) then writeln('respectable')
  else writeln('ugly');
end.

uses math;
var x, y: array [1..8] of longint;
    i, j, maxx, maxy, minx, miny, count: longint;
    t1, t2, t3, t4, t5, t6, t:boolean;
begin
        readln(x[1], y[1]);
        maxx := x[1];
        minx := x[1];
        maxy := y[1];
        miny := y[1];
        for i := 2 to 8 do
        begin
                read(x[i], y[i]);
                maxx := max(maxx, x[i]);
                minx := min(minx, x[i]);
                maxy := max(maxy, y[i]);
                miny := min(miny, y[i]);
        end;
        for i := 1 to 8 do
        begin
                if (x[i] = maxx) and (y[i] = maxy) then
                        t1 := true;
                if (x[i] = minx) and (y[i] = miny) then
                        t2 := true;
                if (x[i] = maxx) and (y[i] = miny) then
                        t3 := true;
                if (x[i] = minx) and (y[i] = maxy) then
                        t4 := true;
        end;
        for i := minx + 1 to maxx - 1 do
        begin
                count := 0;
                for j := 1 to 8 do
                        if (x[j] = i) and ((y[j] = miny) or (y[j] = maxy)) then
                                inc(count);
                if count = 2 then
                        t5 := true;
        end;
        for i := miny + 1 to maxy - 1 do
        begin
                count := 0;
                for j := 1 to 8 do
                        if (y[j] = i) and ((x[j] = minx) or (x[j] = maxx)) then
                                inc(count);
                if count = 2 then t6 := true;
        end;
        t := t1 and t2 and t3 and t4 and t5 and t6;
        if t then
                writeln('respectable')
        else
                writeln('ugly');
end.

var n,m,i,j,k,ans,l,r:longint;
    a,b:array[1..8]of longint;
procedure sort(l,r: longint);
      var
         i,j,x,y,z: longint;
      begin
         i:=l;
         j:=r;
         x:=a[(l+r) div 2];
         z:=b[(l+r) div 2];
         repeat
           while (a[i]<x) or ((a[i]=x) and (b[i]<z)) do
            inc(i);
           while (x<a[j]) or ((x=a[j]) and (z<b[j])) do
            dec(j);
           if not(i>j) then
             begin
                y:=a[i];
                a[i]:=a[j];
                a[j]:=y;
                y:=b[i];
                b[i]:=b[j];
                b[j]:=y;
                inc(i);
                j:=j-1;
             end;
         until i>j;
         if l<j then
           sort(l,j);
         if i<r then
           sort(i,r);
      end;
  begin
    for i:=1 to 8 do
     read(a[i],b[i]);
    sort(1,8);
    if (a[1]=a[2]) and (a[2]=a[3]) and (a[3]<a[4]) and (a[4]=a[5]) and
    (a[5]<a[6]) and (a[6]=a[7]) and (a[7]=a[8]) and (b[1]<b[2]) and
    (b[2]<b[3]) and (b[4]=b[1]) and (b[5]=b[3]) and (b[6]=b[1]) and
    (b[7]=b[2]) and (b[8]=b[3]) then writeln('respectable') else
    writeln('ugly');

  end.

const
  inf='b.in';
  outf='b.out';
var
  ok:boolean;
  i,j,k,uu,vv:longint;
  x,y,u,v:array[1..100] of longint;
  a,b:array[0..1000000] of boolean;
procedure swap(var x,y:longint);
var
  z:longint;
begin
  z:=x; x:=y; y:=z;
end;
function main:boolean;
begin
  for i:=1 to 8 do begin
    read(x[i],y[i]);
    if not a[x[i]] then begin
      a[x[i]]:=true;
      inc(uu);
      u[uu]:=x[i];
    end;
    if not b[y[i]] then begin
      b[y[i]]:=true;
      inc(vv);
      v[vv]:=y[i];
    end;
  end;
  if uu<>3 then exit(false);
  if vv<>3 then exit(false);
  for i:=1 to 3 do
    for j:=i+1 to 3 do if u[i]>u[j] then swap(u[i],u[j]);
  for i:=1 to 3 do
    for j:=i+1 to 3 do if v[i]>v[j] then swap(v[i],v[j]);
  for i:=1 to 3 do
    for j:=1 to 3 do if not((i=2) and (j=2)) then begin
      ok:=true;
      for k:=1 to 8 do if (x[k]=u[i]) and (y[k]=v[j]) then begin
        ok:=false;
        break
      end;
      if ok then exit(false);
    end;
  for i:=1 to 8 do if (x[i]=u[2]) and (y[i]=v[2]) then exit(false);
  exit(true);
end;
begin
  if main then writeln('respectable') else writeln('ugly');
end.

program probb;
var
	a:array[1..8,1..2] of longint;
	i,j,k,n,x,y:longint;
begin
	for i:=1 to 8 do begin
		readln(a[i,1],a[i,2]);
	end;
	for i:=1 to 7 do
		for j:=i+1 to 8 do
			if (a[i,1]=a[j,1])and(a[i,2]=a[j,2]) then begin writeln('ugly'); exit; end;
	for i:=1 to 7 do
		for j:=i+1 to 8 do
			if (a[i,1]>a[j,1])or((a[i,1]=a[j,1])and(a[i,2]>a[j,2])) then begin
				k:=a[i,1]; a[i,1]:=a[j,1]; a[j,1]:=k;
				k:=a[i,2]; a[i,2]:=a[j,2]; a[j,2]:=k;
			end;
	x:=a[4,1]; y:=a[2,2];
	if (a[1,1]<>a[2,1])or(a[2,1]<>a[3,1]) then begin writeln('ugly'); exit; end;
	if (a[4,1]<>x)or(x<>a[5,1]) then begin writeln('ugly'); exit; end;
	if (a[6,1]<>a[7,1])or(a[7,1]<>a[8,1]) then begin writeln('ugly'); exit; end;

	if (a[1,2]<>a[4,2])or(a[4,2]<>a[6,2]) then begin writeln('ugly'); exit; end;
	if (a[2,2]<>y)or(y<>a[7,2]) then begin writeln('ugly'); exit; end;
	if (a[3,2]<>a[5,2])or(a[5,2]<>a[8,2]) then begin writeln('ugly'); exit; end;

	writeln('respectable');
end.

Var n,i,j,f:longint;
    x,y:array[1..8]of longint;
  Begin
    for i:=1 to 8 do
     Read(x[i],y[i]);
    for i:=1 to 7 do
     for j:=i+1 to 8 do
      if (x[i]>x[j])or((x[i]=x[j])and(y[i]>y[j])) then
       begin
         f:=x[i];
         x[i]:=x[j];
         x[j]:=f;
         f:=y[i];
         y[i]:=y[j];
         y[j]:=f
       end;
    for i:=2 to 8 do
     if (x[i]=x[i-1])and(y[i]=y[i-1]) then begin Write('ugly');exit end;
    if (x[1]=x[2])and(x[2]=x[3])and
    (x[4]=x[5])and(x[6]=x[7])and(x[7]=x[8])and
    (y[1]=y[4])and(y[4]=y[6])and
    (y[2]=y[7])and(y[3]=y[5])and(y[5]=y[8])then Write('respectable')
                                           else Write('ugly')
  End.

var i,j,b: longint;
    x,y: array[1..8] of longint;
    f: boolean;
procedure print;
begin
 write('ugly');
 halt(0);
end;

BEGIN
 //assign(input,'input.txt'); reset(input);
 for i:=1 to 8 do read(x[i],y[i]);
 for i:=1 to 7 do
  for j:=i+1 to 8 do
   if (x[i]>x[j])or((x[i]=x[j])and(y[i]>y[j])) then
    begin
     b:=x[i]; x[i]:=x[j]; x[j]:=b;
     b:=y[i]; y[i]:=y[j]; y[j]:=b;
    end;
 for i:=2 to 3 do
  if x[i]<>x[i-1] then print;
 for i:=5 to 5 do
  if x[i]<>x[i-1] then print;
 for i:=7 to 8 do
  if x[i]<>x[i-1] then print;
 if (x[4]=x[3])or(x[6]=x[5]) then print;
 f:=(y[2]>y[1])and(y[2]<y[3]);
 if not (f) then print;
 f:=(y[7]>y[6])and(y[7]<y[8])and(y[7]=y[2]);
 if not (f) then print;
 f:=(y[3]>y[1])and(y[3]=y[5])and(y[3]=y[8]);
 if not (f) then print;
 f:=(y[1]=y[4])and(y[1]=y[6]);
 if not (f) then print;
 write('respectable');
END.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
 x,y:array [1..8] of longint;
 i,j:byte;
 t1,t2:longint;
 f:boolean;
begin
  {assign(Input,'in.txt');
  reset(Input);
  Assign(Output,'out.txt');
  Rewrite(Output); }
  for i:=1 to 8 do
   readln(x[i],y[i]);
  for i:= 1 to 7 do
   for j:=i+1 to 8 do
    if x[i]>x[j] then
    begin
      t1:=x[i];
      x[i]:=x[j];
      x[j]:=t1;
      t2:=y[i];
      y[i]:=y[j];
      y[j]:=t2;
    end;
   f:=(x[1]=x[2]) and (x[1]=x[3])
   and  (x[4]=x[5])
   and  (x[6]=x[7]) and (x[6]=x[8])
   and (x[1]<>x[4]) and (x[4]<>x[6]);
   if f then
   begin
    for i:=1 to 2 do
     for j:=i+1 to 3 do
      if y[i]>y[j] then
      begin
       t2:=y[i];
       y[i]:=y[j];
       y[j]:=t2;
      end;

     if y[4]>y[5] then
     begin
       t2:=y[4];
       y[4]:=y[5];
       y[5]:=t2;
     end;

     for i:=6 to 7 do
     for j:=i+1 to 8 do
      if y[i]>y[j] then
      begin
       t2:=y[i];
       y[i]:=y[j];
       y[j]:=t2;
      end;
    f:= (y[1]=y[4]) and (y[1]=y[6])
    and (y[2]=y[7])
    and (y[3]=y[5]) and (y[3]=y[8])
    and (y[1]<>y[2]) and (y[2]<>y[3]);
   end;
   if f then writeln ('respectable')
   else writeln('ugly');
   readln;
end.

program Project334b;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  X:array[1..8] of Integer;
  Y:array[1..8] of Integer;
  povt:array[1..8] of Byte;
  max,min,k,i,j:Integer;
  begin
  i:=1;
  while i<=8 do
   begin
     read(x[i]);
     Read(y[i]);    readln;
     Inc(i);
   end;

  for i:=1 to 7 do
   begin
    min:=x[i];
    max:=y[i];
    for j:=i+1 to 8 do
    if min>x[j] then
     begin
      min:=x[j];
      max:=y[j];
      k:=j;
       x[k]:=x[i];
     x[i]:=min;
     y[k]:=y[i];
     y[i]:=max;
      end;

    end;
    k:=1;
    if (x[1]=x[2]) and (x[2]=x[3]) and  (x[4]=x[5])  and (x[6]=x[7]) and (x[7]=x[8]) and (x[1]<>x[4]) and (x[1]<>x[8]) and (x[4]<>x[8])  then
    begin
     k:=0;

    max:=y[1];
    min:=y[1];
    for i:=1 to 5 do
    begin
    if y[i]<min
     then min:=y[i];
    if y[i]>max
    then max:=y[i];
     for j:=6 to 8 do
      if y[i]=y[j] then
      begin
      Inc(povt[i]);
      inc(povt[j]);
      end;
      end;

      for i:=1 to 5 do
      if povt[i]<>1
        then k:=1;
      for I:=6 to 8 do
      if povt[i]>2 then k:=1;
      if k=0 then
      begin
        if (y[4]=max) and (y[5]=min) then k:=0 else
        if (y[5]=max) and (y[4]=min) then k:=0 else k:=1;
       end;
      end;
    if k=0 then write('respectable') else write('ugly') ;
end.

var
  n, i, j, sum, k1, k2, tmp, x1, y1: longint;
  x, y, xx, yy: array[1..8] of longint;
  a: array[1..3, 1..3] of byte;
  fl1, fl2: boolean;

begin
  k1 := 0;
  k2 := 0;
  for i := 1 to 8 do begin
    read(xx[i], yy[i]);
    fl1 := false;
    fl2 := false;
    for j := 1 to k1 do
      if x[j] = xx[i] then
        fl1 := true;
    for j := 1 to k2 do
      if y[j] = yy[i] then
        fl2 := true;

    if not fl1 then begin
      inc(k1);
      x[k1] := xx[i];
    end;

    if not fl2 then begin
      inc(k2);
      y[k2] := yy[i];
    end;
  end;

  if (k1 <> 3) or (k2 <> 3) then begin
    write('ugly');
    halt;
  end;

  for i := 1 to 2 do
    for j := 1 to 3 - i do begin
      if x[j] > x[j + 1] then begin
        tmp := x[j];
        x[j] := x[j + 1];
        x[j + 1] := tmp;
      end;
      if y[j] > y[j + 1] then begin
        tmp := y[j];
        y[j] := y[j + 1];
        y[j + 1] := tmp;
      end;
    end;

  fillchar(a, sizeof(a), 0);
  for i := 1 to 8 do begin
    for j := 1 to 3 do
      if xx[i] = x[j] then
        x1 := j;
    for j := 1 to 3 do
      if yy[i] = y[j] then
        y1 := j;
    a[x1][y1] := 1;
  end;

  sum := 0;
  for i := 1 to 3 do
    for j := 1 to 3 do
      inc(sum, a[i][j]);

  if (sum <> 8) or (a[2][2] = 1) then begin
    write('ugly');
    halt;
  end;

  write('respectable');

end.

                            {$APPTYPE CONSOLE}
                            const  besk=100000000000000;
   nnn=2000000;  eps=1e-13;
 label 1,2,3,4;
var i,k,nn,n,i10,i100,n1,dl,kol,ii,jj,i3,i2,i1,j1,k1,kt,ppp,mask,i0,j0,step,j,start,finish:longint;
t,p,m1,pl,sum,p1,p2,m,k2,r,cc,ot,aa,bb,ka,kd,ll,rr,d1,d2,kolvyk,q,t1,t2,modul,pp,tt,ot1,ot2,s,kold,kkr:int64;
mon1,mon2,day1,day2,god1,god2,plus,kk,mnog,koef:int64;
fl0,fl10,fl100,flag2,flag1,flag:boolean;
ott,pp1,pp2,dl1,dl2,dl3,hh,po,pt,doltek,dolpred:extended;
dx,dy,b,a,c:array[-1000..200000] of int64;

xx1,xx2,yy1,yy2,x1,x2,y1,y2,xx,yy,z1,z,x,y: array[-10..5000] of int64;
gr1,gr: array[-50..1050,-50..1050] of int64;
a2,deg,marked:array[-100000..250000] of int64;
dd:array[-10..5001,-10..5001] of longint;
{ss:array[0..2000000] of char; }
sss:string;
ab:array[-100..200,-100..201,-100..201] of char;
ch11,ch12,ch1,ch:char;
sl,sr,str :array[-10 ..200000] of int64;
ssot:array[-1000..1100000] of char;
fact:array[0..100] of extended;
name:array[0..2000] of string;
function min (a,b:int64):int64;begin min:=b;if a<b then min:=a;  end;
function max (a,b:int64):int64;begin max:=b;if a>b then max:=a;  end;

    function nod(a,b:int64):int64; var p,t:int64;
begin if (a>0)and(b>0) then
   begin while (b>0) do begin t:=a mod b;a:=b;b:=t;    end;
    p:=a;
   end else if a=0 then p:=b else p:=a;
nod:=p;
end;

function degg(a,k:int64):int64; var p:int64;
begin
 if k=0 then degg:=1 else if odd(k) then degg:=degg(a,k-1)*a mod modul else
   begin  p:=degg(a,k div 2); degg:=p*p mod modul;   end;

end;

function good(ur:int64):boolean;  var p,i1,i2,i,j,k:longint; fl:boolean;
  begin
    fl:=false;
    for i:=1 to n do for j:=1 to m do if gr[i,j]>=ur then gr1[i,j]:=1 else gr1[i,j]:=0;
    for i1:=1 to n do for i2:=i1+1 to n do
      begin
        p:=0;
        for j:=1 to m do a[j]:=min(gr1[i1,j],gr1[i2,j]);
        for j:=1 to m do p:=p+a[j];
        if p>=2 then fl:=true;
      end;
    good:=fl;
  end;
begin
 {  assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
  }
                              modul:=1000000007 ;

 for i:=1 to 8 do read(x[i],y[i]);
 for i:=1 to 8 do x[i]:=2000000*x[i]+y[i];
{for i:=1 to 8 do write(x[i],' '); writeln;
}for i:=1 to 8 do for j:=1 to 7 do if x[j]>x[j+1] then
 begin t:=x[j]; x[j]:=x[j+1]; x[j+1]:=t;    end;
{for i:=1 to 8 do write(x[i],' '); writeln;
}for i:=1 to 8 do begin  y[i]:=x[i] mod 2000000;  x[i]:=x[i] div 2000000;     end;

{for i:=1 to 8 do writeln(x[i],' ',y[i]);
}flag:=true;
if (x[1]<>x[2])or(x[2]<>x[3]) then flag:=false;
if (x[6]<>x[7])or(x[7]<>x[8]) then flag:=false;
if x[4]<>x[5] then flag:=false;

if (y[1]<>y[4])or(y[4]<>y[6]) then flag:=false;
if (y[3]<>y[5])or(y[5]<>y[8]) then flag:=false;
if y[2]<>y[7] then flag:=false;

if (x[1]=x[4])or(x[4]=x[6]) then flag:=false;
if (y[1]=y[2])or(y[2]=y[3]) then flag:=false;

if flag then write('respectable' ) else write('ugly');

   1:          close(output);

end.

Var i:longint;
x,y:array[1..8] of longint;
procedure sort(n:longint);
Var f:boolean;
i,k:longint;
begin
  repeat
    f:=true;
    for i:=1 to n-1 do
    if (x[i]>x[i+1])or((x[i]=x[i+1])and(y[i]>y[i+1]))
    then begin
          f:=false;
          k:=x[i]; x[i]:=x[i+1]; x[i+1]:=k;
          k:=y[i]; y[i]:=y[i+1]; y[i+1]:=k;
         end;
    dec(n);
  until f;
end;
begin
//  Assign(input,'input.txt'); reset(input);
//  Assign(output,'output.txt'); rewrite(output);
  for i:=1 to 8 do
  read(x[i],y[i]);
  sort(8);
  if (x[1]=x[2])and(x[1]=x[3])and(x[4]=x[5])and(x[6]=x[7])and(x[6]=x[8])and(y[1]=y[4])and(y[1]=y[6])and(y[2]=y[7])and(y[3]=y[8])and(y[3]=y[5])and(x[1]<x[4])and(x[4]<x[6])and(y[1]<y[2])and(y[2]<y[3])
  then writeln('respectable')
  else writeln('ugly');
end.

{$R+,Q+,I+}
{$apptype console}
Uses SysUtils,math;
Var
   x,y,a,b:Array[0..30] of Integer;
   used:Array[0..30,0..30] of Boolean;
   i,j,i1,j1,k1,i2,j2,k2,i3,j3,f,t,k:Integer;
Begin
   For i:=1 To 8 Do Read(x[i],y[i]);
   For i1:=1 To 6 Do
      For j1:=i1+1 To 7 Do
         For k1:=j1+1 To 8 Do
            If (x[i1]<>x[j1]) and (x[j1]<>x[k1]) Then Begin
               For i2:=1 To 6 Do
                  For j2:=i2+1 To 7 Do
                     For k2:=j2+1 To 8 Do
                        If (y[i2]<>y[j2]) and (y[j2]<>y[k2]) Then Begin
                           For i:=1 To 8 Do
                              For j:=1 To 8 Do used[i,j]:=false;
                           a[1]:=x[i1];
                           a[2]:=x[j1];
                           a[3]:=x[k1];
                           For i:=1 To 2 Do
                              For j:=i+1 To 3 Do
                                 If a[i]>a[j] Then Begin
                                    t:=a[i];
                                    a[i]:=a[j];
                                    a[j]:=t;
                                 End;
                           b[1]:=y[i2];
                           b[2]:=y[j2];
                           b[3]:=y[k2];
                           For i:=1 To 2 Do
                              For j:=i+1 To 3 DO
                                 If b[i]>b[j] Then Begin
                                    t:=b[i];
                                    b[i]:=b[j];
                                    b[j]:=t;
                                 End;
                           f:=1;
                           k:=0;
                           For i:=1 To 8 Do
                              For i3:=1 To 3 Do
                                 For j3:=1 To 3 Do
                                    If (x[i]=a[i3]) and (y[i]=b[j3]) Then Begin
                                       If ((i3=2) and (j3=2)) or (used[i3,j3]) Then f:=0;
                                       used[i3,j3]:=true;
                                       k:=k+1;
                                    End;
                        If (f=1) and (k=8) Then Begin
                              Write('respectable');
                              Halt;
                           End;
                        End;
            End;
   Write('ugly');
End.

program Project1;

{$APPTYPE CONSOLE}

uses  SysUtils;
var mas: array [1..2, 1..8] of Integer;
    x,y,x1,x2, i,j,t : Integer;
    f: Boolean;
begin
  { TODO -oUser -cConsole Main : Insert code here }
  f := False;
  for i:=1 to 8 do Readln(mas[1,i],  mas[2,i]);
  for i:=8 downto 2 do
    for j:=1 to i-1 do
      if   (mas[1,j]>mas[1,j+1]) or ((mas[1,j]=mas[1,j+1])and(mas[2,j]>mas[2,j+1]))  then
      begin
         t:=mas[1,j];  mas[1, j]:=mas[1,j+1];   mas[1,j+1]:=t;
         t:=mas[2,j];  mas[2, j]:=mas[2,j+1];   mas[2,j+1]:=t;
      end;

 // for i:=1 to 8 do
 //   writeln(mas[1,i], '  ', mas[2,i]);

 if (mas[1,1]=mas[1,2])and(mas[1,1]=mas[1,3])and(mas[1,1]<mas[1,4]) then
   if  (mas[1,4]=mas[1,5])and(mas[1,4]<mas[1,6]) then
     if  (mas[1,6]=mas[1,7])and(mas[1,6]=mas[1,8]) then
       if  (mas[2,1]=mas[2,4]) and  (mas[2,1]=mas[2,6])and(mas[2,1]<mas[2,2]) then
         if  (mas[2,2]=mas[2,7])and(mas[2,2]<mas[2,3])   then
           if  (mas[2,3]=mas[2,5])and(mas[2,3]=mas[2,8]) then  f:=True;

 if f then Writeln('respectable') else writeln('ugly');

end.

{$APPTYPE CONSOLE}
{$R+,Q+,I+,O-}
var c:array[0..1000000,1..2] of longint;
    a,b:array[1..8,1..2] of longint;
    d,e,f,g:array[1..8] of longint;
    n,i,j,k,k1,k2,x,y:longint;

procedure swap(var a,b:longint);
var w:longint;
begin
  w:=a;
  a:=b;
  b:=w;
end;

begin
  {assign(input,'input.txt');
  reset(input);
  assign(output,'output.txt');
  rewrite(output); }
  k:=0; k1:=0; k2:=0;
  fillchar(c,sizeof(c),0);
  for i:=1 to 8 do
  begin
    readln(a[i,1],a[i,2]);
    inc(c[a[i,1],1]);
    inc(c[a[i,2],2]);
  end;
  for i:=0 to 1000000 do
  begin
    if (c[i,1]>0) then
    begin
      inc(k1);
      d[k1]:=c[i,1];
      f[k1]:=i;
    end;
    if (c[i,2]>0) then
    begin
      inc(k2);
      e[k2]:=c[i,2];
      g[k2]:=i;
    end;
  end;

  if (d[1]=3) and (d[2]=2) and (d[3]=3) and (e[1]=3) and (e[2]=2) and (e[3]=3) then
  begin
    for i:=1 to 3 do
      for j:=1 to 3 do
      begin
        if (i=2) and (j=2) then continue;
        inc(k);
        b[k,1]:=f[i];
        b[k,2]:=g[j];
      end;
    for i:=1 to 7 do
      for j:=i+1 to 8 do
      begin
        if (a[i,1]>a[j,1]) or ((a[i,1]=a[j,1]) and (a[i,2]>a[j,2])) then
        begin
          swap(a[i,1],a[j,1]);
          swap(a[i,2],a[j,2]);
        end;
      end;
    k:=0;
    for i:=1 to 8 do if (a[i,1]=b[i,1]) and (a[i,2]=b[i,2]) then inc(k);
    //for i:=1 to 8 do Writeln(a[i,1],' ',a[i,2],' ',b[i,1],' ',b[i,2]);
    if (k=8) then
    begin
      writeln('respectable');
      halt;
    end;
  end;
  writeln('ugly');
end.

{$APPTYPE CONSOLE}

uses
  SysUtils,math;
  const in_file='input.txt';
  const out_file='output.txt';
  var
  i,j,n,m,k,ans,xk,yk,cnt,z,x1,x2,x3,y1,y2,y3:longint;
  x,y:array[1..8] of integer;
  b:array[1..8] of boolean;

begin
//assign(input,in_file); reset(input);
//assign(output,out_file); rewrite(output);
  fillchar(x,sizeof(x),0);
  fillchar(y,sizeof(y),0);
  for i:=1 to 8 do readln(x[i],y[i]);

  for x1:=1 to 8 do
  begin
   for x2:=1 to 8 do
   begin
    for x3:=1 to 8 do
    begin

    if ((x1=x2)or(x2=x3)or(x1=x3)) then continue;
    if (x[x1]<x[x2])and(x[x2]<x[x3]) then else continue;

    for y1:=1 to 8 do
    begin
     for y2:=1 to 8 do
     begin
      for y3:=1 to 8 do
      begin
       if ((y1=y2)or(y2=y3)or(y1=y3)) then continue;
      if (y[y1]<y[y2])and(y[y2]<y[y3]) then else continue;
        fillchar(b,sizeof(b),false);

    xk:=x[x1];
    yk:=y[y1];

    for z:=1 to 8 do
    begin
     if (x[z]=xk)and(yk=y[z])and(b[z]=false) then begin b[z]:=true; break; end;
    end;
     xk:=x[x1];
    yk:=y[y2];

    for z:=1 to 8 do
    begin
     if (x[z]=xk)and(yk=y[z])and(b[z]=false) then begin b[z]:=true; break; end;
    end;

     xk:=x[x1];
    yk:=y[y3];

    for z:=1 to 8 do
    begin
     if (x[z]=xk)and(yk=y[z])and(b[z]=false) then begin b[z]:=true; break; end;
    end;

     xk:=x[x2];
    yk:=y[y1];

    for z:=1 to 8 do
    begin
     if (x[z]=xk)and(yk=y[z])and(b[z]=false) then begin b[z]:=true; break; end;
    end;

     xk:=x[x2];
    yk:=y[y3];

    for z:=1 to 8 do
    begin
     if (x[z]=xk)and(yk=y[z])and(b[z]=false) then begin b[z]:=true; break; end;
    end;

     xk:=x[x3];
    yk:=y[y1];

    for z:=1 to 8 do
    begin
     if (x[z]=xk)and(yk=y[z])and(b[z]=false) then begin b[z]:=true; break; end;
    end;

     xk:=x[x3];
    yk:=y[y2];

    for z:=1 to 8 do
    begin
     if (x[z]=xk)and(yk=y[z])and(b[z]=false) then begin b[z]:=true; break; end;
    end;

     xk:=x[x3];
    yk:=y[y3];

    for z:=1 to 8 do
    begin
     if (x[z]=xk)and(yk=y[z])and(b[z]=false) then begin b[z]:=true; break; end;
    end;
    cnt:=0;
    for z:=1 to 8 do
    begin
    if (b[z]) then cnt:=cnt+1;
    end;
    if (cnt=8) then begin writeln('respectable');  halt; end;

      end;
     end;
    end;

    end;
   end;
  end;
  writeln('ugly');

//close(output);
//close(input);
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var i,j,z: integer;
    x,y: array[1..8] of integer;
begin
  for i:=1 to 8 do readln(x[i],y[i]);
  for i:=1 to 7 do
    for j:=i+1 to 8 do
      if (x[i]>x[j]) or (x[i]=x[j])and(y[i]>y[j]) then begin
        z:=x[i]; x[i]:=x[j]; x[j]:=z;
        z:=y[i]; y[i]:=y[j]; y[j]:=z;
      end;
  if (x[1]=x[2]) and (x[2]=x[3]) and (x[3]<>x[4]) and (x[4]=x[5]) and (x[5]<>x[6]) and (x[6]=x[7]) and (x[7]=x[8]) and
     (y[1]=y[4]) and (y[4]=y[6]) and (y[1]<>y[2]) and (y[2]=y[7]) and (y[2]<>y[3]) and (y[3]=y[5]) and (y[5]=y[8])
     then writeln('respectable')
     else writeln('ugly');
end.

type    te = record
                x, y : longint;
                end;
var     a : array[1..8] of te;
        d : array[1..8] of integer;
        i, j, d1, d2, t : longint;
        flag : boolean;
        xi : array[0..3] of longint;
        yi : array[0..3] of longint;
procedure swap(var x, y : te);
        var     tmp : te;
        begin
          tmp := x;
          x := y;
          y := tmp;
        end;
begin
        for i := 1 to 8 do
                begin
                readln(a[i].x, a[i].y);
                end;
        for i := 1 to 7 do
                for j := i + 1 to 8 do
                        if a[i].x > a[j].x then
                                swap(a[i], a[j]);
        d1 := 0; d2 := 0;
        t := -1;
        for i := 1 to 6 do
                If (a[i].x = a[i+1].x) and (a[i].x = a[i+2].x) and
                        (a[i].x <> t) then
                begin
                  t := a[i].x;
                  inc(d1);
                end;
        xi[0] := -1;
        j := 1;
        for i := 1 to 8 do
                if (a[i].x <> xi[j-1]) and (j <= 3) then
                        begin
                          xi[j] := a[i].x;
                          inc(j);
                        end;
        // ----------------------------------------
        for i := 1 to 7 do
                for j := i + 1 to 8 do
                        if a[i].y > a[j].y then
                                swap(a[i], a[j]);
        t := -1;
        for i := 1 to 6 do
                if (a[i].y = a[i+1].y) and (a[i].y = a[i+2].y) and
                        (a[i].y <> t) then
                begin
                  t := a[i].y;
                  inc(d2);
                end;
        j := 1;
        yi[0] := -1;
        for i := 1 to 8 do
                if (a[i].y <> yi[j-1]) and (j <= 3) then
                        begin
                          yi[j] := a[i].y;
                          inc(j);
                        end;
        flag := true;
        for i := 1 to 8 do
                if (a[i].x = xi[2]) and (a[i].y = yi[2]) then
                        flag := false;
        if (d1 = 2) and (d2 = 2) and (flag) then
                writeln('respectable')
        else writeln('ugly');
end.

type    te = record
                x, y : longint;
                end;
var     a : array[1..8] of te;
        i, j, d1, d2, t : longint;
        flag : boolean;
        xi : array[0..3] of longint;
        yi : array[0..3] of longint;
procedure swap(var x, y : te);
        var     tmp : te;
        begin
          tmp := x;
          x := y;
          y := tmp;
        end;
begin
        flag := true;
        for i := 1 to 8 do
                begin
                readln(a[i].x, a[i].y);
                end;
        for i := 1 to 7 do
                for j := i + 1 to 8 do
                        if a[i].x > a[j].x then
                                swap(a[i], a[j]);
        for i := 1 to 7 do
                begin
                  for j := 1 to 8 do
                        if i <> j then
                                if (a[i].x = a[j].x) and (a[i].y = a[j].y) then
                                        flag := false;
                end;
        d1 := 0; d2 := 0;
        t := -1;
        for i := 1 to 6 do
                If (a[i].x = a[i+1].x) and (a[i].x = a[i+2].x) and
                        (a[i].x <> t) then
                begin
                  t := a[i].x;
                  inc(d1);
                end;
        xi[0] := -1;
        j := 1;
        for i := 1 to 8 do
                if (a[i].x <> xi[j-1]) and (j <= 3) then
                        begin
                          xi[j] := a[i].x;
                          inc(j);
                        end;
        // ----------------------------------------
        for i := 1 to 7 do
                for j := i + 1 to 8 do
                        if a[i].y > a[j].y then
                                swap(a[i], a[j]);
        t := -1;
        for i := 1 to 6 do
                if (a[i].y = a[i+1].y) and (a[i].y = a[i+2].y) and
                        (a[i].y <> t) then
                begin
                  t := a[i].y;
                  inc(d2);
                end;
        j := 1;
        yi[0] := -1;
        for i := 1 to 8 do
                if (a[i].y <> yi[j-1]) and (j <= 3) then
                        begin
                          yi[j] := a[i].y;
                          inc(j);
                        end;
        for i := 1 to 8 do
                if (a[i].x = xi[2]) and (a[i].y = yi[2]) then
                        flag := false;

        if (d1 = 2) and (d2 = 2) and (flag) then
                writeln('respectable')
        else writeln('ugly');
end.

type    te = record
                x, y : longint;
                end;
var     a : array[1..8] of te;
        i, j, d1, d2, t : longint;
        flag : boolean;
        xi : array[0..3] of longint;
        yi : array[0..3] of longint;
procedure swap(var x, y : te);
        var     tmp : te;
        begin
          tmp := x;
          x := y;
          y := tmp;
        end;
begin
        flag := true;
        for i := 1 to 8 do
                begin
                readln(a[i].x, a[i].y);
                end;
        for i := 1 to 7 do
                for j := i + 1 to 8 do
                        if a[i].x > a[j].x then
                                swap(a[i], a[j]);
        for i := 1 to 7 do
                if (a[i].x = a[i+1].x) and (a[i].y = a[i+1].y) then
                        flag := false;
        d1 := 0; d2 := 0;
        t := -1;
        for i := 1 to 6 do
                If (a[i].x = a[i+1].x) and (a[i].x = a[i+2].x) and
                        (a[i].x <> t) then
                begin
                  t := a[i].x;
                  inc(d1);
                end;
        xi[0] := -1;
        j := 1;
        for i := 1 to 8 do
                if (a[i].x <> xi[j-1]) and (j <= 3) then
                        begin
                          xi[j] := a[i].x;
                          inc(j);
                        end;
        // ----------------------------------------
        for i := 1 to 7 do
                for j := i + 1 to 8 do
                        if a[i].y > a[j].y then
                                swap(a[i], a[j]);
        t := -1;
        for i := 1 to 6 do
                if (a[i].y = a[i+1].y) and (a[i].y = a[i+2].y) and
                        (a[i].y <> t) then
                begin
                  t := a[i].y;
                  inc(d2);
                end;
        j := 1;
        yi[0] := -1;
        for i := 1 to 8 do
                if (a[i].y <> yi[j-1]) and (j <= 3) then
                        begin
                          yi[j] := a[i].y;
                          inc(j);
                        end;
        for i := 1 to 8 do
                if (a[i].x = xi[2]) and (a[i].y = yi[2]) then
                        flag := false;

        if (d1 = 2) and (d2 = 2) and (flag) then
                writeln('respectable')
        else writeln('ugly');
end.

const finp='';
    fout='';
var x,y:array[1..8] of longint;
procedure nhap;
var i,j,t:longint;
    f:text;
begin
    assign(f,finp);
    reset(f);
    For i:=1 to 8 do readln(f,x[i],y[i]);
    for i:=1 to 7 do
        for j:=i+1 to 8 do
            if (y[i]>y[j])or((y[i]=y[j])and(x[i]>x[j])) then
                begin
                    t:=x[i];
                    x[i]:=x[j];
                    x[j]:=t;
                    t:=y[i];
                    y[i]:=y[j];
                    y[j]:=t;
                end;
    close(f);
end;
procedure xuly;
var f:text;
begin
    assign(f,fout);
    rewrite(f);
    if (x[1]+x[3]=x[2]*2)and(y[1]=y[2])and(y[2]=y[3])and(y[1]+y[6]=y[4]*2)and(x[1]=x[4])and(x[4]=x[6])and(y[1]<>y[6])and(x[1]<>x[3]) then
        if (x[6]+x[8]=x[7]*2)and(y[6]=y[7])and(y[7]=y[8])and(y[3]+y[8]=y[5]*2)and(x[3]=x[5])and(x[5]=x[8])and(x[6]<>x[8])and(y[3]<>y[8]) then
            begin
                writeln(f,'respectable');
                close(F);
                exit;
            end;
    writeln(f,'ugly');
    close(F);
end;
begin
    nhap;
    xuly;
end.

const finp='';
    fout='';
var x,y:array[1..8] of longint;
procedure nhap;
var i,j,t:longint;
    f:text;
begin
    assign(f,finp);
    reset(f);
    For i:=1 to 8 do readln(f,x[i],y[i]);
    for i:=1 to 7 do
        for j:=i+1 to 8 do
            if (y[i]>y[j])or((y[i]=y[j])and(x[i]>x[j])) then
                begin
                    t:=x[i];
                    x[i]:=x[j];
                    x[j]:=t;
                    t:=y[i];
                    y[i]:=y[j];
                    y[j]:=t;
                end;
    close(f);
end;
procedure xuly;
var f:text;
begin
    assign(f,fout);
    rewrite(f);
    if (x[1]+x[3]=x[2]*2)and(y[1]=y[2])and(y[2]=y[3])and(y[1]+y[6]=y[4]*2)and(x[1]=x[4])and(x[4]=x[6]) then
        if (x[6]+x[8]=x[7]*2)and(y[6]=y[7])and(y[7]=y[8])and(y[3]+y[8]=y[5]*2)and(x[3]=x[5])and(x[5]=x[8]) then
            begin
                writeln(f,'respectable');
                close(F);
                exit;
            end;
    writeln(f,'ugly');
    close(F);
end;
begin
    nhap;
    xuly;
end.

var j,x,y,n,i:longint;
    a,b:array[0..1000000]of longint;
    q,w:array[0..8]of longint;
procedure swap(var q,w:longint);
var z:longint;
 begin
  z:=q;
  q:=w;
  w:=z;
 end;
 begin
  n:=8;
  for i:=1 to n do
   begin
    read(q[i],w[i]);
    inc(a[q[i]]);
    inc(b[w[i]]);
   end;
  for i:=0 to 1000000 do
   if(a[i]>0)then inc(x);
  for i:=0 to 1000000 do
   if(b[i]>0)then inc(y);
  if(x<>3)or(y<>3)then
   begin
    writeln('ugly');
    exit;
   end;
  for i:=1 to n-1 do
   for j:=i+1 to n do
    if(q[i]>q[j])or((q[i]=q[j])and(w[i]>w[j]))then
     begin
      swap(q[i],q[j]);
      swap(w[i],w[j]);
     end;
  if(q[1]=q[2])and(q[2]=a[3])and(q[3]<>q[4])and(q[4]=q[5])and(q[5]<>q[6])and(q[6]=q[7])and(q[7]=q[8])and
    (w[1]=w[4])and(w[4]=w[6])and(w[1]<>w[2])and(w[2]=w[7])and(w[2]<>w[3])and(w[3]=w[5])and(w[5]=w[8])then writeln('respectable') else writeln('ugly');
 end.

var j,n,i:longint;
    x,y:array[0..8]of longint;
procedure swap(var q,w:longint);
var z:longint;
 begin
  z:=q;
  q:=w;
  w:=z;
 end;
 begin
  n:=8;
  for i:=1 to n do
   read(x[i],y[i]);
  for i:=1 to n-1 do
   for j:=i+1 to n do
    if(x[i]>x[j])or (x[i]=x[j])and(y[i]>y[j]) then
     begin
      swap(x[i],y[j]);
      swap(x[i],y[j]);
     end;
    if (x[1]=x[2]) and (x[2]=x[3]) and (x[3]<>x[4]) and (x[4]=x[5]) and (x[5]<>x[6]) and (x[6]=x[7]) and (x[7]=x[8]) and
     (y[1]=y[4]) and (y[4]=y[6]) and (y[1]<>y[2]) and (y[2]=y[7]) and (y[2]<>y[3]) and (y[3]=y[5]) and (y[5]=y[8])
     then writeln('respectable')
     else writeln('ugly');
 end.

var j,n,i:longint;
    x,y:array[0..8]of longint;
procedure swap(var q,w:longint);
var z:longint;
 begin
  z:=q;
  q:=w;
  w:=z;
 end;
 begin
  n:=8;
  for i:=1 to n do
   read(x[i],y[i]);
  for i:=1 to n-1 do
   for j:=i+1 to n do
    if(x[i]>x[j])or((x[i]=x[j])and(y[i]>y[j]))then
     begin
      swap(x[i],y[j]);
      swap(x[i],y[j]);
     end;
  if(x[1]=x[2])and(x[2]=x[3])and(x[3]<>x[4])and(x[4]=x[5])and(x[5]<>x[6])and(x[6]=x[7])and(x[7]=x[8])then
   begin
    if(y[1]=y[4])and(y[4]=y[6])and(y[1]<>y[2])and(y[2]=y[7])and(y[2]<>y[3])and(y[3]=y[5])and(y[5]=y[8])then
     begin
      writeln('respectable');
      exit;
     end;
   end;
  writeln('ugly');
 end.

var j,n,i:longint;
    x,y:array[0..8]of longint;
procedure swap(var q,w:longint);
var z:longint;
 begin
  z:=q;
  q:=w;
  w:=z;
 end;
 begin
  n:=8;
  for i:=1 to n do
   read(x[i],y[i]);
  for i:=1 to n-1 do
   for j:=i+1 to n do
    if(x[i]>x[j])or((x[i]=x[j])and(y[i]>y[j]))then
     begin
      swap(x[i],y[j]);
      swap(x[i],y[j]);
     end;
    if (x[1]=x[2]) and (x[2]=x[3]) and (x[3]<>x[4]) and (x[4]=x[5]) and (x[5]<>x[6]) and (x[6]=x[7]) and (x[7]=x[8]) and
     (y[1]=y[4]) and (y[4]=y[6]) and (y[1]<>y[2]) and (y[2]=y[7]) and (y[2]<>y[3]) and (y[3]=y[5]) and (y[5]=y[8])
     then writeln('respectable')
     else writeln('ugly');
 end.

Const fi='';
      fo='';
var i,j,b: longint;
    x,y: array[1..8] of longint;
    f: boolean; fg,g:Text;
procedure print;
begin
 write(g,'ugly');
 Close(g);
 halt;
end;

BEGIN
        assign(fg,fi); reset(fg);
        assign(g,fo); rewrite(g);
        for i:=1 to 8 do readln(fg,x[i],y[i]);
        for i:=1 to 7 do
        for j:=i+1 to 8 do
                if (x[i]>x[j])or((x[i]=x[j])and(y[i]>y[j])) then
                begin
                        b:=x[i]; x[i]:=x[j]; x[j]:=b;
                        b:=y[i]; y[i]:=y[j]; y[j]:=b;
                end;
         for i:=2 to 3 do if x[i]<>x[i-1] then print;
         for i:=5 to 6 do if x[i]<>x[i-1] then print;
         for i:=7 to 8 do if x[i]<>x[i-1] then print;
         if (x[4]=x[3])or(x[6]=x[5]) then print;
         f:=(y[2]>y[1])and(y[2]<y[3]);
         if not (f) then print;
         f:=(y[7]>y[6])and(y[7]<y[8])and(y[7]=y[2]);
         if not (f) then print;
         f:=(y[3]>y[1])and(y[3]=y[5])and(y[3]=y[8]);
         if not (f) then print;
         f:=(y[1]=y[4])and(y[1]=y[6]);
         if not (f) then print;
         write(g,'respectable');
        Close(fg);Close(g);
END.

var i, b, c, d, x, y, z, l, l1, k: longint;
    a: array [1..8, 1..2] of longint;
begin
  for i := 1 to 8 do
  begin
    read(a[i, 1], a[i, 2]);
    if i = 1 then
    begin
      b := a[i, 1];
    end
    else
    begin
      if (a[i, 1] <> b) and(l = 0) then
      begin
        c := a[i, 1];
        l := 1;
      end
      else
      if (l = 1) and(a[i, 1] <> c)and(a[i, 1] <> b) then
      begin
        d := a[i, 1];
        l := 2;
      end
      else
      if (l = 2) then
      begin
        if (a[i, 1] = b) or (a[i, 1] = c) or (a[i, 1] = d) then else k := 1;
      end;
    end;
    if i = 1 then
    begin
      x := a[i, 2];
    end
    else
    begin
      if (a[i, 2] <> x) and (l1 = 0) then
      begin
        y := a[i, 2];
        l1 := 1;
      end
      else
      if (l1 = 1) and (a[i, 2] <> y)and(a[i, 2] <> x) then
      begin
        z := a[i, 2];
        l1 := 2;
      end
      else
      if (l1 = 2) then
      begin
        if (a[i, 2] = x) or (a[i, 2] = y) or (a[i, 2] = z) then else  k := 1;
      end;
    end;
    if (l1 >= 1) and(l >= 1) then if (a[i, 1] = c) and (a[i, 2] = y) then k := 1;
  end;
  if (l1*l <> 4) then k := 1;
  if k = 1 then write('ugly') else write('respectable');
end.

var i, b, c, d, x, y, z, l, l1, k, q, w: longint;
    a: array [1..8, 1..2] of longint;
begin
  for i := 1 to 8 do
  begin
    read(a[i, 1], a[i, 2]);
    if i = 1 then
    begin
      b := a[i, 1];
    end
    else
    begin
      if (a[i, 1] <> b) and(l = 0) then
      begin
        c := a[i, 1];
        l := 1;
      end
      else
      if (l = 1) and(a[i, 1] <> c)and(a[i, 1] <> b) then
      begin
        d := a[i, 1];
        l := 2;
      end
      else
      if (l = 2) then
      begin
        if (a[i, 1] = b) or (a[i, 1] = c) or (a[i, 1] = d) then else k := 1;
      end;
    end;
    if i = 1 then
    begin
      x := a[i, 2];
    end
    else
    begin
      if (a[i, 2] <> x) and (l1 = 0) then
      begin
        y := a[i, 2];
        l1 := 1;
      end
      else
      if (l1 = 1) and (a[i, 2] <> y)and(a[i, 2] <> x) then
      begin
        z := a[i, 2];
        l1 := 2;
      end
      else
      if (l1 = 2) then
      begin
        if (a[i, 2] = x) or (a[i, 2] = y) or (a[i, 2] = z) then else  k := 1;
      end;
    end;

  end;
  if l *l1 = 4 then
  begin
    if ((b < d) and (b > c) )or((b < c)and(b > d)) then q:=b;
    if ((c < d) and (c > b) )or((c < b)and(c > d)) then q:=c;
    if ((d < b) and (d > c) )or((d < c)and(d > b)) then q:=d;
    if ((x < z) and (x > y) )or((x < y)and(x > z)) then w:=x;
    if ((y < z) and (y > x) )or((y < x)and(y > z)) then w:=y;
    if ((z < x) and (z > y) )or((z < y)and(z > x)) then w:=z;
  end
  else k:= 1;
  for i:=1 to 8 do
  begin
    if (a[i, 1] = q) and(a[i, 2]= w) then k:= 1;
  end;
  if (l1*l <> 4) then k := 1;
  if k = 1 then write('ugly') else write('respectable');
end.

var i, b, c, d, x, y, z, l, l1, k: integer;
    a: array [1..8, 1..2] of integer;
begin
  for i := 1 to 8 do
  begin
    read(a[i, 1], a[i, 2]);
    if i = 1 then
    begin
      b := a[i, 1];
    end
    else
    begin
      if (a[i, 1] <> b) and(l = 0) then
      begin
        c := a[i, 1];
        l := 1;
      end
      else
      if (l = 1) and(a[i, 1] <> c)and(a[i, 1] <> b) then
      begin
        d := a[i, 1];
        l := 2;
      end
      else
      if (l = 2) then
      begin
        if (a[i, 1] = b) or (a[i, 1] = c) or (a[i, 1] = d) then else k := 1;
      end;
    end;
    if i = 1 then
    begin
      x := a[i, 2];
    end
    else
    begin
      if (a[i, 2] <> x) and (l1 = 0) then
      begin
        y := a[i, 2];
        l1 := 1;
      end
      else
      if (l1 = 1) and (a[i, 2] <> y)and(a[i, 2] <> x) then
      begin
        z := a[i, 2];
        l1 := 2;
      end
      else
      if (l1 = 2) then
      begin
        if (a[i, 2] = x) or (a[i, 2] = y) or (a[i, 2] = z) then else  k := 1;
      end;
    end;
    if (l1 = 1) and(l = 1) then if (a[i, 1] = c) and (a[i, 2] = y) then k := 1;
  end;
  if (l1*l <> 4) then k := 1;
  if k = 1 then write('ugly') else write('respectable');
end.

var i, b, c, d, x, y, z, l, l1, k: integer;
    a: array [1..8, 1..2] of integer;
begin
  for i := 1 to 8 do
  begin
    read(a[i, 1], a[i, 2]);
    if i = 1 then
    begin
      b := a[i, 1];
    end
    else
    begin
      if (a[i, 1] <> b) and(l = 0) then
      begin
        c := a[i, 1];
        l := 1;
      end
      else
      if (l = 1) and(a[i, 1] <> c)and(a[i, 1] <> b) then
      begin
        d := a[i, 1];
        l := 2;
      end
      else
      if (l = 2) then
      begin
        if (a[i, 1] <> b) or (a[i, 1] <> c) or (a[i, 1] <> d) then k := 1;
      end;
    end;
    if i = 1 then
    begin
      x := a[i, 2];
    end
    else
    begin
      if (a[i, 2] <> x) and (l1 = 0) then
      begin
        y := a[i, 2];
        l1 := 1;
      end
      else
      if (l1 = 1) and (a[i, 2] <> y)and(a[i, 2] <> x) then
      begin
        z := a[i, 2];
        l1 := 2;
      end
      else
      if (l1 = 2) then
      begin
        if (a[i, 2] <> x) or (a[i, 2] <> y) or (a[i, 2] <> z) then k := 1;
      end;
    end;
    if (l1 = 1) and(l = 1) then if (a[i, 1] = c) and (a[i, 2] = y) then k := 1;
  end;
  if (l1*l <> 4) then k := 1;
  if k = 1 then write('ugly') else write('respectable');
end.

var i, b, c, d, x, y, z, l, l1, k, q, w, j: longint;
    a: array [1..8, 1..2] of longint;
begin
  for i := 1 to 8 do
  begin
    read(a[i, 1], a[i, 2]);
    if i = 1 then
    begin
      b := a[i, 1];
    end
    else
    begin
      if (a[i, 1] <> b) and(l = 0) then
      begin
        c := a[i, 1];
        l := 1;
      end
      else
      if (l = 1) and(a[i, 1] <> c)and(a[i, 1] <> b) then
      begin
        d := a[i, 1];
        l := 2;
      end
      else
      if (l = 2) then
      begin
        if (a[i, 1] = b) or (a[i, 1] = c) or (a[i, 1] = d) then else k := 1;
      end;
    end;
    if i = 1 then
    begin
      x := a[i, 2];
    end
    else
    begin
      if (a[i, 2] <> x) and (l1 = 0) then
      begin
        y := a[i, 2];
        l1 := 1;
      end
      else
      if (l1 = 1) and (a[i, 2] <> y)and(a[i, 2] <> x) then
      begin
        z := a[i, 2];
        l1 := 2;
      end
      else
      if (l1 = 2) then
      begin
        if (a[i, 2] = x) or (a[i, 2] = y) or (a[i, 2] = z) then else  k := 1;
      end;
    end;

  end;
  if l *l1 = 4 then
  begin
    if ((b < d) and (b > c) )or((b < c)and(b > d)) then q:=b;
    if ((c < d) and (c > b) )or((c < b)and(c > d)) then q:=c;
    if ((d < b) and (d > c) )or((d < c)and(d > b)) then q:=d;
    if ((x < z) and (x > y) )or((x < y)and(x > z)) then w:=x;
    if ((y < z) and (y > x) )or((y < x)and(y > z)) then w:=y;
    if ((z < x) and (z > y) )or((z < y)and(z > x)) then w:=z;
  end
  else k:= 1;
  for i:=1 to 8 do
  begin

    if (a[i, 1] = q) and(a[i, 2]= w) then k:= 1;
    for j := 1 to 8 do
    if(a[i, 1]= a[j, 1])and(a[i, 2] = a[j, 2]) then k := 1;
  end;
  if (l1*l <> 4) then k := 1;
  if k = 1 then write('ugly') else write('respectable');
end.

var i, b, c, d, x, y, z, l, l1, k: integer;
    a: array [1..8, 1..2] of integer;
begin
  for i := 1 to 8 do
  begin
    read(a[i, 1], a[i, 2]);
    if i = 1 then
    begin
      b := a[i, 1];
    end
    else
    begin
      if (a[i, 1] <> b) and(l = 0) then
      begin
        c := a[i, 1];
        l := 1;
      end
      else
      if (l = 1) and(a[i, 1] <> c)and(a[i, 1] <> b) then
      begin
        d := a[i, 1];
        l := 2;
      end
      else
      if (l = 2) then
      begin
        if (a[i, 1] = b) or (a[i, 1] = c) or (a[i, 1] = d) then else k := 1;
      end;
    end;
    if i = 1 then
    begin
      x := a[i, 2];
    end
    else
    begin
      if (a[i, 2] <> x) and (l1 = 0) then
      begin
        y := a[i, 2];
        l1 := 1;
      end
      else
      if (l1 = 1) and (a[i, 2] <> y)and(a[i, 2] <> x) then
      begin
        z := a[i, 2];
        l1 := 2;
      end
      else
      if (l1 = 2) then
      begin
        if (a[i, 2] = x) or (a[i, 2] = y) or (a[i, 2] = z) then else  k := 1;
      end;
    end;
    if (l1 >= 1) and(l >= 1) then if (a[i, 1] = c) and (a[i, 2] = y) then k := 1;
  end;
  if (l1*l <> 4) then k := 1;
  if k = 1 then write('ugly') else write('respectable');
end.

CONST
 fi = '';//'8PS.INP';
 fo = '';//'8PS.OUT';
 n = 8;

TYPE
 mang = array [1..8] of longint;

VAR
 f: text;
 x, y: mang;
 maxx, maxy, minx, miny, gx, gy: longint;

{====================================================================}
{====================================================================}

procedure DocFile;
 var
  i: integer;
 Begin
  assign (f, fi); reset (f);
   maxx := -1;   maxy := -1;   minx := 1000001;   miny := minx;
   for i:=1 to n do begin
                     readln (f, x[i], y[i]);
                     if maxx < x[i] then maxx := x[i];
                     if maxy < y[i] then maxy := y[i];
                     if minx > x[i] then minx := x[i];
                     if miny > y[i] then miny := y[i];
                    end;
  close (f);

  for i:=1 to n do
   begin
    if (x[i] <> maxx) and (x[i] <> minx) then gx := x[i];
    if (y[i] <> maxy) and (y[i] <> miny) then gy := y[i];
   end;
 End;

{====================================================================}
{====================================================================}

procedure GhiKQ (x: boolean);
 Begin
  assign (f, fo); rewrite (f);
   if x then write (f, 'respectable')
        else write (f, 'ugly');
  close (f);
  halt;
 End;

{------------------------------}

procedure EightPS;
 var
  i: integer;
  tmaxx, tmaxy, tminx, tminy, tgx, tgy: integer;
 Begin
  if (maxx = minx) or (maxy = miny) then GhiKQ (false);

  tmaxx := 0;   tminx := 0;   tmaxy := 0;   tminy := 0;   tgx := 0;   tgy := 0;

  for i:=1 to n do
   begin
    if x[i] = maxx then inc (tmaxx);
    if x[i] = minx then inc (tminx);
    if y[i] = maxy then inc (tmaxy);
    if y[i] = miny then inc (tminy);
    if x[i] = gx   then inc (tgx);
    if y[i] = gy   then inc (tgy);
   end;

  if (tmaxx <> 3) or (tmaxy <> 3) or (tminx <> 3) or (tminy <> 3) or (tgx <> 2) or (tgy <> 2)
  then GhiKQ (false)
  else GhiKQ (true);
 End;

{====================================================================}
{====================================================================}

BEGIN
 DocFile;
 EightPS;
END.

CONST
 fi = '';//'8PS.INP';
 fo = '';//'8PS.OUT';
 n = 8;

TYPE
 mang = array [1..8] of longint;

VAR
 f: text;
 x, y: mang;
 maxx, maxy, minx, miny, gx, gy: longint;

{====================================================================}
{====================================================================}

procedure DocFile;
 var
  i: integer;
 Begin
  assign (f, fi); reset (f);
   maxx := -1;   maxy := -1;   minx := 1000001;   miny := minx;
   for i:=1 to n do begin
                     readln (f, x[i], y[i]);
                     if maxx < x[i] then maxx := x[i];
                     if maxy < y[i] then maxy := y[i];
                     if minx > x[i] then minx := x[i];
                     if miny > y[i] then miny := y[i];
                    end;
  close (f);

  for i:=1 to n do
   begin
    if (x[i] <> maxx) and (x[i] <> minx) then gx := x[i];
    if (y[i] <> maxy) and (y[i] <> miny) then gy := y[i];
   end;
 End;

{====================================================================}
{====================================================================}

procedure GhiKQ (x: boolean);
 Begin
  assign (f, fo); rewrite (f);
   if x then write (f, 'respectable')
        else write (f, 'ugly');
  close (f);
  halt;
 End;

{------------------------------}

procedure EightPS;
 var
  i: integer;
  tmaxx, tmaxy, tminx, tminy, tgx, tgy: integer;
 Begin
  if (maxx = minx) or (maxy = miny) then GhiKQ (false);

  tmaxx := 0;   tminx := 0;   tmaxy := 0;   tminy := 0;   tgx := 0;   tgy := 0;

  for i:=1 to n do
   begin
    if x[i] = maxx then inc (tmaxx);
    if x[i] = minx then inc (tminx);
    if y[i] = maxy then inc (tmaxy);
    if y[i] = miny then inc (tminy);
    if (x[i] <> maxx) and (x[i] <> minx) then inc (tgx);
    if (y[i] <> maxy) and (y[i] <> miny) then inc (tgy);
   end;

  if (tmaxx <> 3) or (tmaxy <> 3) or (tminx <> 3) or (tminy <> 3) or (tgx <> 2) or (tgy <> 2)
  then GhiKQ (false)
  else GhiKQ (true);
 End;

{====================================================================}
{====================================================================}

BEGIN
 DocFile;
 EightPS;
END.

const   fi='';
        fo='';
var     f,g:text;
        x2,y2,x,y,sl,sl2:array[1..8] of longint;
        dem,dem2,i,j:longint;
        stop:boolean;
begin
        assign(f,fi);
        reset(f);
        assign(g,fo);
        rewrite(g);
        dem:=0;
        dem2:=0;
        for i:=1 to 8 do
        begin
                readln(F,x[i],y[i]);
                stop:=false;
                for j:=1 to dem do
                        if x[i]=x2[j] then
                        begin
                                sl[j]:=sl[j]+1;
                                stop:=true;
                                break;
                        end;
                if stop=false then
                begin
                        dem:=dem+1;
                        x2[dem]:=x[i];
                        sl[dem]:=1;
                end;
                stop:=false;
                for j:=1 to dem2 do
                        if y[i]=y2[j] then
                        begin
                                sl2[j]:=sl2[j]+1;
                                stop:=true;
                                break;
                        end;
                if stop=false then
                begin
                        dem2:=dem2+1;
                        y2[dem2]:=y[i];
                        sl2[dem2]:=1;
                end;
        end;
        close(f);

        if (dem<>3) or (dem2<>3) then writeln(g,'ugly') else
        begin
                stop:=false;
                for i:=1 to 3 do
                        if i=2 then
                                if sl[i]<>2 then
                                begin
                                        stop:=true;
                                        break;
                                end
                        else else if sl[i]<>3 then
                        begin
                                stop:=true;
                                break;
                        end;
                if stop=true then
                begin
                        writeln(g,'ugly');
                        close(g);
                        halt;
                end;
                        stop:=false;
                        for i:=1 to 3 do
                                if i=2 then
                                        if sl2[i]<>2 then
                                        begin
                                                stop:=true;
                                                break;
                                        end
                                else else if sl2[i]<>3 then
                                begin
                                        stop:=true;
                                        break;
                                end;
                        if stop=true then
                        begin
                                writeln(g,'ugly');
                                close(g);
                                halt;
                        end;
                x2[4]:=x2[1];
                if x2[2]>x2[4] then
                        if x2[3]>x2[2] then x2[4]:=x2[2]
                                else if x2[3]>x2[1] then x2[4]:=x2[3];
                y2[4]:=y2[1];
                if y2[2]>y2[4] then
                        if y2[3]>y2[2] then y2[4]:=y2[2]
                                else if y2[3]>y2[1] then y2[4]:=y2[3];
                stop:=false;
                for i:=1 to 8 do
                        if (x[i]=x2[4]) and (y[i]=y2[4]) then
                        begin
                                writeln(g,'ugly');
                                stop:=true;
                                break;
                        end;
                if stop=false then writeln(g,'respectable');
        end;
        close(g);
end.

const   fi='';
        fo='';
var     f,g:text;
        x2,y2,x,y:array[1..8] of longint;
        dem,dem2,i,j:longint;
        stop:boolean;
begin
        assign(f,fi);
        reset(f);
        assign(g,fo);
        rewrite(g);
        dem:=0;
        dem2:=0;
        for i:=1 to 8 do
        begin
                readln(F,x[i],y[i]);
                stop:=false;
                for j:=1 to dem do
                        if x[i]=x2[j] then
                        begin
                                stop:=true;
                                break;
                        end;
                if stop=false then
                begin
                        dem:=dem+1;
                        x2[dem]:=x[i];
                end;
                stop:=false;
                for j:=1 to dem2 do
                        if y[i]=y2[j] then
                        begin
                                stop:=true;
                                break;
                        end;
                if stop=false then
                begin
                        dem2:=dem2+1;
                        y2[dem2]:=y[i];
                end;
        end;
        close(f);

        if (dem<>3) or (dem2<>3) then writeln(g,'ugly') else
        begin
                x2[4]:=x2[1];
                if x2[2]>x2[4] then
                        if x2[3]>x2[2] then x2[4]:=x2[2]
                                else if x2[3]>x2[1] then x2[4]:=x2[3];
                y2[4]:=y2[1];
                if y2[2]>y2[4] then
                        if y2[3]>y2[2] then y2[4]:=y2[2]
                                else if y2[3]>y2[1] then y2[4]:=y2[3];
                stop:=false;
                for i:=1 to 8 do
                        if (x[i]=x2[4]) and (y[i]=y2[4]) then
                        begin
                                writeln(g,'ugly');
                                stop:=true;
                                break;
                        end;
                if stop=false then writeln(g,'respectable');
        end;
        close(g);
end.

program problem2;

function med( a, b, c: longInt ): longInt;
begin
	if ( a < b ) and ( b < c ) then
		exit( b )
	else if ( a < c ) and ( c < b ) then
		exit( c )
	else
		exit( a );
end;

var	i, j, xCnt, yCnt: longInt;
	x, y, xx, yy: array[ 1..8 ] of longInt;

begin
	for i := 1 to 8 do
		readln( x[i], y[i] );

	for i := 1 to 8 do
		for j := i + 1 to 8 do
			if ( x[i] = x[j] ) and ( y[i] = y[j] ) then
			begin
				writeln( 'ugly' );
				halt;
			end;

	for i := 1 to 8 do
	begin
		xx[i] := -1;
		yy[i] := -1;
	end;

	xCnt := 0;
	yCnt := 0;
	for i := 1 to 8 do
	begin
		if ( x[i] <> xx[1] ) and ( x[i] <> xx[2] ) and ( x[i] <> xx[3] ) then
		begin
			inc( xCnt );
			xx[xCnt] := x[i];
		end;

		if ( y[i] <> yy[1] ) and ( y[i] <> yy[2] ) and ( y[i] <> yy[3] ) then
		begin
			inc( yCnt );
			yy[yCnt] := y[i];
		end;
	end;

	if ( xCnt <> 3 ) or ( yCnt <> 3 ) then
	begin
		writeln( 'ugly' );
		halt;
	end;

	for i := 1 to 8 do
		if ( x[i] = med( xx[1], xx[2], xx[3] ) ) and ( y[i] = med( yy[1], yy[2], yy[3] ) ) then
		begin
			writeln( 'ugly' );
			halt;
		end;

	writeln( 'respectable' );
end.

var
  tot,i,n,l1,t,j:longint;
  x1:array[1..100]of longint;
  f:array[0..1000000]of boolean;
  x,y:array[1..20]of longint;
begin
  n:=8;
  for i:=1 to n do
    readln(x[i],y[i]);
  for i:=1 to n do
    for j:=1 to n do
      if (x[i]=x[j])and(y[i]=y[j]) then
        begin
          writeln('ugly');
          exit;
        end;
  for i:=1 to n do
    if f[x[i]]=false then
      begin
        f[x[i]]:=true;
        inc(tot);
        if tot>3 then
          begin
            writeln('ugly');
            exit;
          end;
        inc(l1);
        x1[l1]:=x[i];
      end;
  tot:=0;
  fillchar(f,sizeof(f),false);
  for i:=1 to n do
    if f[y[i]]=false then
      begin
        f[y[i]]:=true;
        inc(tot);
        if tot>3 then
          begin
           writeln('ugly');
           exit;
          end;
      end;
   for i:=1 to 2 do
     for j:=i+1 to 3 do
       if x1[j]>x1[i] then
         begin
           t:=x1[j];
           x1[j]:=x1[i];
           x1[i]:=t;
         end;
   tot:=0;
   for i:=1 to n do
     if (x[i]=x1[2]) then
       inc(tot);
   if tot<>2 then writeln('ugly') else writeln('respectable');
    { begin
       tot:=0;
       for i:=1 to n do
         if x[i]=x1[1] then
           inc(tot);
       if tot<>3 then writeln('ugly') else
         begin
           tot:=0;
           for i:=1 to n do
             if (y[i]=y1[2]) then
               inc(tot);
           if tot<>2 then writeln('ugly')
           else
             begin
               tot:=0;
               for i:=1 to n do
                 if (y[i]=y1[1]) then
                   inc(tot);
               if tot<>3 then writeln('ugly') else writeln('respectable');
             end;
         end;
     end;    }
end.

var
  tot,i,n,l1,l2,t,j:longint;
  x1,y1:array[1..100]of longint;
  f:array[0..1000000]of boolean;
  x,y:array[1..20]of longint;
begin
  n:=8;
  for i:=1 to n do
    readln(x[i],y[i]);
  for i:=1 to n do
    if f[x[i]]=false then
      begin
        f[x[i]]:=true;
        inc(tot);
        if tot>3 then
          begin
            writeln('ugly');
            exit;
          end;
        inc(l1);
        x1[l1]:=x[i];
      end;
  tot:=0;
  fillchar(f,sizeof(f),false);
  for i:=1 to n do
    if f[y[i]]=false then
      begin
        f[y[i]]:=true;
        inc(tot);
        if tot>3 then
          begin
           writeln('ugly');
           exit;
          end;
        inc(l2);
        y1[l2]:=y[i];
      end;
   for i:=1 to 2 do
     for j:=i+1 to 3 do
       if x1[j]>x1[i] then
         begin
           t:=x1[j];
           x1[j]:=x1[i];
           x1[i]:=t;
         end;
   for i:=1 to 2 do
     for j:=i+1 to 3 do
       if y1[j]>y1[i] then
         begin
           t:=y1[j];
           y1[j]:=y1[i];
           y1[i]:=t;
         end;
   tot:=0;
   for i:=1 to n do
     if (x[i]=x1[2]) then
       inc(tot);
   if tot<>2 then writeln('ugly') else
     begin
       tot:=0;
       for i:=1 to n do
         if x[i]=x1[1] then
           inc(tot);
       if tot<>3 then writeln('ugly') else
         begin
           tot:=0;
           for i:=1 to n do
             if (y[i]=y1[2]) then
               inc(tot);
           if tot<>2 then writeln('ugly')
           else
             begin
               tot:=0;
               for i:=1 to n do
                 if (y[i]=y1[1]) then
                   inc(tot);
               if tot<>3 then writeln('ugly') else writeln('respectable');
             end;
         end;
     end;
end.

var
  tot,i,n,l1,t,j:longint;
  x1:array[1..100]of longint;
  f:array[0..1000000]of boolean;
  x,y:array[1..20]of longint;
begin
  n:=8;
  for i:=1 to n do
    readln(x[i],y[i]);
  for i:=1 to n do
    for j:=1 to n do
      if i<>j then
      if (x[i]=x[j])and(y[i]=y[j]) then
        begin
          writeln('ugly');
          exit;
        end;
  for i:=1 to n do
    if f[x[i]]=false then
      begin
        f[x[i]]:=true;
        inc(tot);
        if tot>3 then
          begin
            writeln('ugly');
            exit;
          end;
        inc(l1);
        x1[l1]:=x[i];
      end;
  tot:=0;
  fillchar(f,sizeof(f),false);
  for i:=1 to n do
    if f[y[i]]=false then
      begin
        f[y[i]]:=true;
        inc(tot);
        if tot>3 then
          begin
           writeln('ugly');
           exit;
          end;
      end;
   for i:=1 to 2 do
     for j:=i+1 to 3 do
       if x1[j]>x1[i] then
         begin
           t:=x1[j];
           x1[j]:=x1[i];
           x1[i]:=t;
         end;
   tot:=0;
   for i:=1 to n do
     if (x[i]=x1[2]) then
       inc(tot);
   if tot<>2 then writeln('ugly') else writeln('respectable');
    { begin
       tot:=0;
       for i:=1 to n do
         if x[i]=x1[1] then
           inc(tot);
       if tot<>3 then writeln('ugly') else
         begin
           tot:=0;
           for i:=1 to n do
             if (y[i]=y1[2]) then
               inc(tot);
           if tot<>2 then writeln('ugly')
           else
             begin
               tot:=0;
               for i:=1 to n do
                 if (y[i]=y1[1]) then
                   inc(tot);
               if tot<>3 then writeln('ugly') else writeln('respectable');
             end;
         end;
     end;    }
end.

uses math;
type mass=array[1..8,1..2] of integer;
     maxx=array[1..12] of integer;
     majj=array[1..8] of boolean;
var d,x,y,kol,p,q,l1,r1,q1,q2,k,uk,min1,e,e1,n,kolv,res,r,l,b,c,max1:int64;s,s1,s2:string;i:integer;
   ch,ce:char;u:boolean;qq,w,o,g,a:int64;m,m3,t,h:mass;v,z,j:integer;m1:maxx;m2:majj;
procedure qsort(var A:mass);
   procedure sort(l,r:integer);
     var i,j,x,w,x1,y: integer;
   begin
     i := l;
     j := r;
     w:=l+random(r-l);
     x := A[w,1];
     x1:=a[w,2];
     repeat
       while (A[i,1] < x) or ((a[i,1]=x) and (a[i,2]<x1)) do inc(i);
       while (x < A[j,1]) or ((a[j,1]=x) and (a[j,2]>x1)) do dec(j);
       if not (i>j) then
         begin
           y    := A[i,1];
           A[i,1] := A[j,1];
           A[j,1] := y;
           y:=a[i,2];
           a[i,2]:=a[j,2];
           a[j,2]:=y;
           inc(i);
           dec(j);
         end;
     until i>j;
     if l < j then sort(l,j);
     if i < r then sort(i,r);
   end;
begin
 sort(1,8);
end;
begin
//  assign(input,'input.txt');
//  assign(output,'output.txt');
  for i:=1 to 8 do
    readln(m[i,1],m[i,2]);
  qsort(m);
  a:=0;
  i:=1;
  for i:=2 to 8 do
     if m[i,1]<>m[i-1,1]
     then inc(a);
  for i:=2 to 8 do
     if (m[i,1]=m[i-1,1]) and (m[i-1,2]=m[i-1,2])
     then Begin
             writeln('ugly');
             halt(0);
          end;
  if a<>2
  then Begin
        writeln('ugly');
        halt(0);
       end;
  m1[1]:=1;
  a:=1;
  for j:=2 to 8 do
     Begin
        if m[j,1]<>m[j-1,1]
        then inc(a);
        inc(m1[a]);
     end;
  if not ((m1[1]=3) and (m1[2]=2) and (m1[3]=3))
  then BEgin
         writeln('ugly');
         halt(0);
       end;
  for z:=1 to 8 do
     Begin
        a:=0;
        for j:=z to 8 do
          if m[j,1]=m[z,1]
          then inc(a);
        if a>3
        then BEgin
                writeln('ugly');
                halt(0);
             end;
        if a=3
        then Begin
                a:=0;
                for j:=z to 8 do
                   if m[j,1]=m[z,1]
                   then Begin
                          inc(a);
                          m1[a]:=m[j,2];
                        end;
                break;
             end;
     end;
  fillchar(m2,sizeof(m2),true);
  for z:=1 to 8 do
     Begin
        if m2[z]=false
        then continue;
        a:=0;
        for j:=z to 8 do
          if m[j,1]=m[z,1]
          then inc(a);
        if a>3
        then BEgin
                writeln('ugly');
                halt(0);
             end;
        if a=2
        then Begin
               a:=1;
               for j:=z to 8 do
                  if m[j,1]=m[z,1]
                  then Begin
                          if m[j,2]<>m1[a]
                          then Begin
                                  writeln('ugly');
                                  halt(0);
                               end;
                          inc(a,2);
                          m2[j]:=false;
                       end;
             end
        else if a=3
             then Begin
                     a:=1;
                     for j:=z to 8 do
                        if m[j,1]=m[z,1]
                        then Begin
                                if m[j,2]<>m1[a]
                                then Begin
                                        writeln('ugly');
                                        halt(0);
                                     end;
                                inc(a);
                                m2[j]:=false;
                             end;
                  end
             else Begin
                     writeln('ugly');
                     halt(0);
                  end;
     end;
   writeln('respectable');
end.

uses math;
type mass=array[1..8,1..2] of integer;
     maxx=array[1..12] of integer;
     majj=array[1..8] of boolean;
var d,x,y,kol,p,q,l1,r1,q1,q2,k,uk,min1,e,e1,n,kolv,res,r,l,b,c,max1:int64;s,s1,s2:string;i:integer;
   ch,ce:char;u:boolean;qq,w,o,g,a:int64;m,m3,t,h:mass;v,z,j:integer;m1:maxx;m2:majj;
procedure qsort(var A:mass);
   procedure sort(l,r:integer);
     var i,j,x,w,x1,y: integer;
   begin
     i := l;
     j := r;
     w:=l+random(r-l);
     x := A[w,1];
     x1:=a[w,2];
     repeat
       while (A[i,1] < x) or ((a[i,1]=x) and (a[i,2]<x1)) do inc(i);
       while (x < A[j,1]) or ((a[j,1]=x) and (a[j,2]>x1)) do dec(j);
       if not (i>j) then
         begin
           y    := A[i,1];
           A[i,1] := A[j,1];
           A[j,1] := y;
           y:=a[i,2];
           a[i,2]:=a[j,2];
           a[j,2]:=y;
           inc(i);
           dec(j);
         end;
     until i>j;
     if l < j then sort(l,j);
     if i < r then sort(i,r);
   end;
begin
 sort(1,8);
end;
begin
//  assign(input,'input.txt');
//  assign(output,'output.txt');
  for i:=1 to 8 do
    readln(m[i,1],m[i,2]);
  qsort(m);
  a:=0;
  i:=1;
  for i:=2 to 8 do
     if m[i,1]<>m[i-1,1]
     then inc(a);
  if a<>2
  then Begin
        writeln('ugly');
        halt(0);
       end;
  m1[1]:=1;
  a:=1;
  for j:=2 to 8 do
     Begin
        if m[j,1]<>m[j-1,1]
        then inc(a);
        inc(m1[a]);
     end;
  if not ((m1[1]=3) and (m1[2]=2) and (m1[3]=3))
  then BEgin
         writeln('ugly');
         halt(0);
       end;
  for z:=1 to 8 do
     Begin
        a:=0;
        for j:=z to 8 do
          if m[j,1]=m[z,1]
          then inc(a);
        if a>3
        then BEgin
                writeln('ugly');
                halt(0);
             end;
        if a=3
        then Begin
                a:=0;
                for j:=z to 8 do
                   if m[j,1]=m[z,1]
                   then Begin
                          inc(a);
                          m1[a]:=m[j,2];
                        end;
                break;
             end;
     end;
  fillchar(m2,sizeof(m2),true);
  for z:=1 to 8 do
     Begin
        if m2[z]=false
        then continue;
        a:=0;
        for j:=z to 8 do
          if m[j,1]=m[z,1]
          then inc(a);
        if a>3
        then BEgin
                writeln('ugly');
                halt(0);
             end;
        if a=2
        then Begin
               a:=1;
               for j:=z to 8 do
                  if m[j,1]=m[z,1]
                  then Begin
                          if m[j,2]<>m1[a]
                          then Begin
                                  writeln('ugly');
                                  halt(0);
                               end;
                          inc(a,2);
                          m2[j]:=false;
                       end;
             end
        else if a=3
             then Begin
                     a:=1;
                     for j:=z to 8 do
                        if m[j,1]=m[z,1]
                        then Begin
                                if m[j,2]<>m1[a]
                                then Begin
                                        writeln('ugly');
                                        halt(0);
                                     end;
                                inc(a);
                                m2[j]:=false;
                             end;
                  end
             else Begin
                     writeln('ugly');
                     halt(0);
                  end;
     end;
   writeln('respectable');
end.

Const Finp='';
      Fout='';
Var n:longint;
    x,y:array[1..8] of longint;

Procedure Nhap;
Var f:Text;
    i:longint;
Begin
    assign(f,finp); reset(f);
    n:=8;
    for i:=1 to n do
        readln(f,x[i],y[i]);
    close(f);
End;
Procedure Trao(var x,y:longint);
Var temp:longint;
Begin
    temp:=x;
    x:=y;
    y:=temp;
End;
Procedure Sort;
Var i,j:longint;
Begin
    for i:=1 to n-1 do
        for j:=i+1 to n do
            if (y[i]<y[j]) or ((y[i]=y[j]) and (x[i]>x[j])) then
                begin
                    trao(x[i],x[j]);
                    trao(y[i],y[j]);
                end;
End;
Procedure Xuat;
Var f:Text;
Begin
    assign(f,fout); rewrite(f);
    if (y[1]-y[4]=1) and (y[4]-y[6]=1) and (x[2]-x[1]=1) and (x[3]-x[2]=1) and (x[5]-x[4]=2) and (x[7]-x[6]=1) and (x[8]-x[7]=1) then
        write(f,'respectable')
    else
        write(f,'ugly');
    close(f);
End;

Begin
    nhap;
    sort;
    xuat;
End.

const n = 8;
var i,j, ans: LongInt;
x,y: array[1..8] of LongInt;
res: Boolean;
begin
  for i:=1 to n do Readln(x[i],y[i]);

  for i:=1 to n-1 do
  begin
    for j:=i+1 to n do
    if (x[j]<x[i]) or (x[j]=x[i]) and (y[j]<y[i]) then
    begin
      ans:=x[j];
      x[j]:=x[i];
      x[i]:=ans;

      ans:=y[j];
      y[j]:=y[i];
      y[i]:=ans;
    end;
  end;

  res:=false;

  if (abs(y[3]-y[1])=abs(y[5]-y[4])) and (abs(x[5]-x[4])=abs(x[8]-x[6])) and (x[1]=x[2]) and (x[2]=x[3]) and (x[3]<>x[4]) and (x[4]=x[5]) and (x[5]<>x[6]) and (x[6]=x[7]) and (x[7]=x[8])
  then res:=true;

  for i:=1 to n-1 do
  begin
    for j:=i+1 to n do
    if (y[j]<y[i]) or (y[j]=y[i]) and (x[j]<x[i]) then
    begin
      ans:=y[j];
      y[j]:=y[i];
      y[i]:=ans;

      ans:=x[j];
      x[j]:=x[i];
      x[i]:=ans;
    end;
  end;

  if res and (abs(x[3]-x[1])=abs(x[5]-x[4])) and (abs(y[5]-y[4])=abs(y[8]-y[6])) and (y[1]=y[2]) and (y[2]=y[3]) and (y[3]<>y[4]) and (y[4]=y[5]) and (y[5]<>y[6]) and (y[6]=y[7]) and (y[7]=y[8]) then
  Writeln('respectable') else Writeln('ugly');

end.

const n = 8;
var i,j, ans: LongInt;
x,y: array[1..8] of LongInt;
begin
  for i:=1 to n do Readln(x[i],y[i]);

  for i:=1 to n-1 do
  begin
    for j:=i+1 to n do
    if (x[j]<x[i]) or (x[j]=x[i]) and (y[j]<y[i]) then
    begin
      ans:=x[j];
      x[j]:=x[i];
      x[i]:=ans;

      ans:=y[j];
      y[j]:=y[i];
      y[i]:=ans;
    end;
  end;

  if (abs(y[3]-y[1])=abs(y[5]-y[4])) and (abs(x[5]-x[4])=abs(x[8]-x[6])) and (x[1]=x[2]) and (x[2]=x[3]) and (x[3]<>x[4]) and (x[4]=x[5]) and (x[5]<>x[6]) and (x[6]=x[7]) and (x[7]=x[8])
  then Writeln('respectable') else Writeln('ugly');

end.

type    qw = record
        x,y : longint;
end;

var     a : array[1..8] of qw;
        i,jx,jy : longint;

procedure  sortx(l,r : longint);
 var    i,j,xt : longint;
        tmp : qw;
 begin
        i := l;
        j := r;
        xt := a[(l+r) div 2].x;
        repeat
                while a[i].x < xt do inc(i);
                while a[j].x > xt do dec(j);
                if i <= j then begin
                        tmp := a[i];
                        a[i] := a[j];
                        a[j] := tmp;
                        inc(i);
                        dec(j);
                end;
        until   i > j;
        if l < j then sortx(l,j);
        if i < r then sortx(i,r);
 end;

procedure  sorty(l,r : longint);
 var    i,j,xt : longint;
        tmp : qw;
 begin
        i := l;
        j := r;
        xt := a[(l+r) div 2].y;
        repeat
                while a[i].y < xt do inc(i);
                while a[j].y > xt do dec(j);
                if i <= j then begin
                        tmp := a[i];
                        a[i] := a[j];
                        a[j] := tmp;
                        inc(i);
                        dec(j);
                end;
        until   i > j;
        if l < j then sorty(l,j);
        if i < r then sorty(i,r);
 end;

procedure thoat;
 begin
        writeln('ugly');
        halt;
 end;

begin
        for i := 1 to 8 do
                readln(a[i].x,a[i].y);
        /////////////////////////////
        sortx(1,8);
        jx := 0;
        for i := 1 to 8 do
                if a[i].x = a[1].x then inc(jx);
        if jx <> 3 then thoat;
        jx := 0;
        for i := 1 to 8 do
                if a[i].x = a[4].x then inc(jx);
        if jx <> 2 then thoat;
        jx := 0;
        for i := 1 to 8 do
                if a[i].x = a[6].x then inc(jx);
        if jx <> 3 then thoat;
        /////////////////////////
        sorty(1,8);
        jy := 0;
        for i := 1 to 8 do
                if a[i].y = a[1].y then inc(jy);
        if jy <> 3 then thoat;
        jy := 0;
        for i := 1 to 8 do
                if a[i].y = a[4].y then inc(jy);
        if jy <> 2 then thoat;
        jy := 0;
        for i := 1 to 8 do
                if a[i].y = a[6].y then inc(jy);
        if jy <> 3 then thoat;
        ///////////////////////
        writeln('respectable');
end.

Var x,y:array [0..100] of longint;
  i,t,tt,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10:longint;

 procedure sort(l,r: longint);
      var
         i,j,xx,yy,z: longint;
      begin
         i:=l;
         j:=r;
         xx:=x[(l+r) div 2];
         z:=y[(l+r) div 2];
         repeat
           while (x[i]<xx) or ((x[i]=xx)and (y[i]<z)) do
            inc(i);
           while (xx<x[j]) or ((xx=x[j]) and (z<y[j])) do
            dec(j);
           if not(i>j) then
             begin
                yy:=x[i];
                x[i]:=x[j];
                x[j]:=yy;

                yy:=y[i];
                y[i]:=y[j];
                y[j]:=yy;

                inc(i);
                j:=j-1;
             end;
         until i>j;
         if l<j then
           sort(l,j);
         if i<r then
           sort(i,r);
      end;

  begin
    for i:=1 to 8 do
     read(x[i],y[i]);
    sort(1,8);
    t1:=round(sqrt(sqr(x[2]-x[1])+sqr(y[2]-y[1])));
    t2:=round(sqrt(sqr(x[3]-x[2])+sqr(y[3]-y[2])));

    t3:=round(sqrt(sqr(x[4]-x[1])+sqr(y[4]-y[1])));

    t4:=round(sqrt(sqr(x[5]-x[4])+sqr(y[5]-y[4])));

    t5:=round(sqrt(sqr(x[4]-x[6])+sqr(y[4]-y[6])));

    t6:=round(sqrt(sqr(x[6]-x[7])+sqr(y[6]-y[7])));

    t7:=round(sqrt(sqr(x[7]-x[8])+sqr(y[7]-y[8])));

    t8:=round(sqrt(sqr(x[5]-x[8])+sqr(y[5]-y[8])));

    t9:=round(sqrt(sqr(x[3]-x[5])+sqr(y[3]-y[5])));

    t10:=round(sqrt(sqr(x[2]-x[7])+sqr(y[2]-y[7])));

    if (t1=t6) and (t2=t7) and (t3=t9) and (t5=t8) and (t10=t8+t9) then
       writeln('respectable')
       else writeln('ugly');
  end.

Var x,y,xx,yy:array [0..100] of longint;
  i,t,tt,k1,k2,j,p:longint;
  f1,f2,f:array [0..2000000] of boolean;

 procedure sort(l,r: longint);
      var
         i,j,xx,yy,z: longint;
      begin
         i:=l;
         j:=r;
         xx:=x[(l+r) div 2];
         z:=y[(l+r) div 2];
         repeat
           while (x[i]<xx) or ((x[i]=xx)and (y[i]<z)) do
            inc(i);
           while (xx<x[j]) or ((xx=x[j]) and (z<y[j])) do
            dec(j);
           if not(i>j) then
             begin
                yy:=x[i];
                x[i]:=x[j];
                x[j]:=yy;

                yy:=y[i];
                y[i]:=y[j];
                y[j]:=yy;

                inc(i);
                j:=j-1;
             end;
         until i>j;
         if l<j then
           sort(l,j);
         if i<r then
           sort(i,r);
      end;

  begin
  fillchar(f1,sizeof(f1),true);
  fillchar(f2,sizeof(f2),true);
    fillchar(f,sizeof(f),true);
    for i:=1 to 8 do
     begin
      read(x[i],y[i]);
     end;
   sort(1,8);
   for i:=1 to 8 do
    begin
      if f1[x[i]] then begin f1[x[i]]:=false; inc(k1); xx[k1]:=x[i]; end;
     if f2[y[i]] then begin f2[y[i]]:=false; inc(k2); yy[k2]:=y[i]; end;
     end;
    if (k1=k2) and (k1=3) then begin
   for i:=1 to k1 do
    for j:=1 to k2 do
     begin
       for p:=1 to 8 do
        begin
          if (x[p]=xx[i]) and (yy[k2]=y[p]) then begin if (i<>2) and (j<>2) then f[p]:=false; end;
        end;
     end;
     for i:=1 to 8 do
     if f[i] then begin writeln('respectable'); halt; end;
     writeln('ugly');
     end
     else writeln('ugly');
  end.

var a:array[1..10,1..10]of word;x,i,j,k,k1,n,u,y:word;b:array[0..1000000,0..1000]of byte;
begin
for i:=1 to 8 do
begin
read(x,y);
a[i,1]:=x;a[i,2]:=y;
{b[x,i]:=1;}
end;
for i:=1 to 8 do
for j:=1 to 8 do
begin
if (a[i,1]-a[j,1]>=2)and(a[i,2]-a[j,2]>=2)then begin  writeln('respectable');exit;end {else
if (a[i,1]-a[j,1]>=2)and(a[i,2]-a[j,2]>=2) then for u:=i to i+a[i,1]-a[j,1] do for y:=u to i+a[i,2]-a[j,2] do
 if b[a[u,1],a[y,2]]=0 then begin writeln('respectable');exit; end;                    }
end;
writeln('ugly');
end.

var a:array[1..10,1..10]of longint;i,j,k,k1,n,u,y:longint;b:array[0..1000000,0..1000000]of longint;
procedure sort(n1,n2:longint);
var i,j,x,q:longint;
begin
i:=n1;j:=n2;
x:=a[i+random(j-i),1];
repeat
while a[i,1]<x do inc(i);
while a[j,1]>x do dec(j);
if i<=j then begin
  q:=a[i,1];
  a[i,1]:=a[j,1];
  a[j,1]:=q;
  q:=a[i,2];
  a[i,2]:=a[j,2];
  a[j,2]:=q;

  inc(i);
  dec(j);
  end;
until i>j;
if i<n2 then sort(i,n2);
if j>n1 then sort(n1,j);
end;

begin
for i:=1 to 8 do
begin
read(a[i,1],a[i,2]);
{inc(b[a[i,1],a[i,2]]);}
end;
for i:=1 to 8 do
for j:=1 to 8 do
begin
if (a[i,1]-a[j,1]>=8)and(a[i,2]-a[j,2]>=8)then begin  write('respectable');exit;end {else
if (a[i,1]-a[j,1]>=2)and(a[i,2]-a[j,2]>=2) then for u:=a[i,1] to a[i,1]+7 do for y:=a[i,1] to a[i,1]+7 do
 if b[u,y]=0 then begin write('respectable');exit; end;                              }
end;
write('ugly');
end.

var
  i, j, k, n, a, b, maxx, maxy, minx, miny, s: longint;
  x, y: array[1..10] of longint;
  f:boolean;

begin
  n := 8;
  for i := 1 to n do read(x[i], y[i]);
 for k:=1 to n do
  for i := 1 to n do
    for j := 1 to n do
      if (y[i] < y[j]) or ((y[i] = y[j]) and (x[i] < x[j])) then
      begin a := y[i]; y[i] := y[j]; y[j] := a; b := x[i]; x[i] := x[j]; x[j] := b; end;

 f:=true;
 if
  (y[1]<>y[2]) or (y[2]<>y[3]) or (y[4]<>y[5]) or (y[6]<>y[7]) or (y[7]<>y[8])
or(x[1]<>x[4]) or (x[4]<>x[6]) or (x[2]<>x[7]) or (x[3]<>x[5]) or (x[5]<>x[8])
then f:=false;
  if f then writeln('respectable') else writeln('ugly');

end.

var
  i, j, k, n, a, b, maxx, maxy, minx, miny, s: longint;
  x, y: array[1..10] of longint;

function gets(): real;
var
  i: longint;
  s: real;
begin
  for i := 2 to n do
    s := s + (x[i] - x[i - 1]) * (y[i] + y[i - 1]) / 2;
  s := s + (x[n] - x[1]) * (y[1] + y[n]) / 2;
  gets := s;
end;

begin
  n := 8;
  for i := 1 to n do read(x[i], y[i]);
  for i := 1 to n do
    for j := 1 to n do
      if (y[i] < y[j]) or ((y[i] = y[j]) and (x[i] < x[j])) then
      begin a := y[i]; y[i] := y[j]; y[j] := a; b := x[i]; x[i] := x[j]; x[j] := b; end;

  maxx := -10000000;
  maxy := -10000000;
  minx := 10000000;
  miny := 10000000;
  for i := 1 to n do
  begin
    if x[i] > maxx then maxx := x[i];
    if x[i] < minx then minx := x[i];
    if y[i] > maxy then maxy := y[i];
    if y[i] < miny then miny := y[i];
  end;
  s := (maxx - minx) * (maxy - miny);
  if (s = gets()) and (s>0) then write('respectable') else write('ugly');
end.

var
  i, j, k, n, a, b, maxx, maxy, minx, miny, s: longint;
  x, y: array[1..10] of longint;
  f:boolean;

begin
  n := 8;
  for i := 1 to n do read(x[i], y[i]);
 for k:=1 to n do
  for i := 1 to n do
    for j := 1 to n do
      if (y[i] < y[j]) or ((y[i] = y[j]) and (x[i] < x[j])) then
      begin a := y[i]; y[i] := y[j]; y[j] := a; b := x[i]; x[i] := x[j]; x[j] := b; end;

 f:=true;
 if
  (y[1]<>y[2]) or (y[2]<>y[3]) or (y[4]<>y[5]) or (y[6]<>y[7]) or (y[7]<>y[8])
or(x[1]<>x[4]) or (x[4]<>x[6]) or (x[2]<>x[7]) or (x[3]<>x[5]) or (x[5]<>x[8])
then f:=false;
  for i:=1 to n do
   for j:=1 to n do
    if (x[i]=x[j]) and (y[i]=y[j]) then f:=false;
  if f then writeln('respectable') else writeln('ugly');

end.

const fn = '';
      gx = '';
var x,y : array[1..8] of longint;
procedure nhap;
var f : text;
    i : longint;
begin
    assign(f,fn); reset(f);
    for i := 1 to 8 do
        readln(f,x[i],y[i]);
    close(f);
end;
procedure sort;
var i,j,k : longint;
begin
    for j := 2 to 8 do
    begin
        i := j;
        while x[i] < x[i-1] do
        begin
            k := x[i]; x[i] := x[i-1]; x[i-1] := k;
            k := y[i]; y[i] := y[i-1]; y[i-1] := k;
            dec(i);
        end;
        while (x[i] = x[i-1]) and (y[i] < y[i-1]) do
        begin
            k := y[i]; y[i] := y[i-1]; y[i-1] := k;
            dec(i);
        end;
    end;
end;
function xuli : boolean;
var i : longint;
begin
    sort;
    for i := 2 to 3 do if x[i] <> x[i-1] then exit(false);
    for i := 2 to 3 do if y[i] <= y[i-1] then exit(false);
    if (x[4] <> x[5]) or (x[4] <= x[1]) then exit(false);
    if (y[4] <> y[1]) or (y[5] <> y[3]) then exit(false);
    for i := 6 to 8 do
        if y[i] <> y[i-5]  then exit(false);
    if x[6] <= x[5] then exit(false);
    for i := 7 to 8 do
        if x[i] <> x[i-1] then exit(false);
    exit(true);
end;
procedure xuat;
var g : text;
begin
    assign(g,gx); rewrite(g);
    if xuli = true then writeln(g,'respectable')
    else writeln(g,'ugly');
    close(g);
end;
begin
    nhap;
    xuat;
end.

const fn = '';
      gx = '';
var x,y : array[1..8] of longint;
procedure nhap;
var f : text;
    i : longint;
begin
    assign(f,fn); reset(f);
    for i := 1 to 8 do
        readln(f,x[i],y[i]);
    close(f);
end;
procedure sort;
var i,j,k : longint;
begin
    for j := 2 to 8 do
    begin
        i := j;
        while x[i] < x[i-1] do
        begin
            k := x[i]; x[i] := x[i-1]; x[i-1] := k;
            k := y[i]; y[i] := y[i-1]; y[i-1] := k;
            dec(i);
        end;
        while (x[i] = x[i-1]) and (y[i] < y[i-1]) do
        begin
            k := y[i]; y[i] := y[i-1]; y[i-1] := k;
            dec(i);
        end;
    end;
end;
function xuli : boolean;
var i : longint;
begin
    sort;
    for i := 2 to 3 do if x[i] <> x[i-1] then exit(false);
    if (x[4] <> x[5]) or (x[4] <= x[1]) then exit(false);
    if (y[4] <> y[1]) or (y[5] <> y[3]) then exit(false);
    for i := 6 to 8 do
        if y[i] <> y[i-5]  then exit(false);
    if x[6] <= x[5] then exit(false);
    for i := 7 to 8 do
        if x[i] <> x[i-1] then exit(false);
    exit(true);
end;
procedure xuat;
var g : text;
begin
    assign(g,gx); rewrite(g);
    if xuli = true then writeln(g,'respectable')
    else writeln(g,'ugly');
    close(g);
end;
begin
    nhap;
    xuat;
end.

const fn = '';
      gx = '';
var x,y : array[1..8] of longint;
procedure nhap;
var f : text;
    i : longint;
begin
    assign(f,fn); reset(f);
    for i := 1 to 8 do
        readln(f,x[i],y[i]);
    close(f);
end;
procedure sort;
var i,j,k : longint;
begin
    for j := 2 to 8 do
    begin
        i := j;
        while x[i] < x[i-1] do
        begin
            k := x[i]; x[i] := x[i-1]; x[i-1] := k;
            k := y[i]; y[i] := y[i-1]; y[i-1] := k;
            dec(i);
        end;
        while (x[i] = x[i-1]) and (y[i] < y[i-1]) do
        begin
            k := y[i]; y[i] := y[i-1]; y[i-1] := k;
            dec(i);
        end;
    end;
end;
function xuli : boolean;
var i : longint;
begin
    sort;
    for i := 2 to 3 do if x[i] <> x[i-1] then exit(false);
    if x[4] <> x[5] then exit(false);
    if (y[4] <> y[1]) or (y[5] <> y[3]) then exit(false);
    for i := 6 to 8 do
        if y[i] <> y[i-5] then exit(false);
    exit(true);
end;
procedure xuat;
var g : text;
begin
    assign(g,gx); rewrite(g);
    if xuli = true then writeln(g,'respectable')
    else writeln(g,'ugly');
    close(g);
end;
begin
    nhap;
    xuat;
end.

var
        n,m,p,xx,xx2,yy,yy2,k,l,i,j,max,min,z,sum,res,x2,y2,b,r,g,q,e : longint;
        a,d : array [0..1000000] of longint;
        s : array [0..1000,0..1000] of longint;
        ans: int64;
        h : boolean;

begin
  for i:=1 to 8 do
  read(a[i],d[i]);
  for i:=1 to 8 do
    for j:=i+1 to 8 do begin
      if (a[j]<a[i]) or ((a[j]=a[i]) and (d[j]<d[i])) then begin
         q:=a[i];
         a[i]:=a[j];
         a[j]:=q;
         q:=d[i];
         d[i]:=d[j];
         d[j]:=q;
       end;
    end;
    if (a[1]=a[2]) and (a[2]=a[3]) and (a[3]<a[4]) and (a[4]=a[5]) and (a[5]<a[6]) and
       (a[6]=a[7]) and (a[7]=a[8]) and (d[1]<d[2]) and (d[2]<d[3]) and (d[4]=d[1]) and
       (d[5]=d[3]) and (d[6]=d[1]) and (d[7]=d[2]) and (d[8]=d[3]) then  writeln('respectable')
    else writeln('ugld');
  end.

const
        fi = '';
var
        a : array[1..2,1..8] of longint;
        i,j,p,x,y,z : longint;
        b : array[0..1000000] of longint;

procedure loi;
begin
        writeln('ugly');
        halt;
end;

begin
        assign(input,fi);
        reset(input);
        for i := 1 to 8 do
                readln(a[1,i],a[2,i]);
        close(input);
        for i := 1 to 7 do
                for j := i+1 to 8 do
                        if (a[1,i] > a[1,j]) then
                        begin
                                p := a[1,i];
                                a[1,i] := a[1,j];
                                a[1,j] := p;
                                p := a[2,i];
                                a[2,i] := a[2,j];
                                a[2,j] := p;
                        end;
        for i := 1 to 7 do
                for j := i+1 to 8 do
                        if (a[1,i] =  a[1,j]) and (a[2,i] > a[2,j]) then
                        begin
                                p := a[1,i];
                                a[1,i] := a[1,j];
                                a[1,j] := p;
                                p := a[2,i];
                                a[2,i] := a[2,j];
                                a[2,j] := p;
                        end;
        for i := 1 to 8 do
                inc(b[a[1,i]]);
        for i := 0 to 1000000 do
        begin
                if (b[i]<>0) and (x=0) then x := b[i]
                else if (b[i]<>0) and (y=0) then y := b[i]
                     else if (b[i]<>0) and(z=0) then z := b[i];
        end;
        if x<>3 then loi;
        if y<>2 then loi;
        if z<>3 then loi;
        fillchar(b,sizeof(b),0);
        for i := 1 to 8 do
                inc(b[a[2,i]]);
        x := 0;
        y := 0;
        z := 0;
        for i := 0 to 1000000 do
        begin
                if (b[i]<>0) and (x=0) then x := b[i]
                else if (b[i]<>0) and (y=0) then y := b[i]
                     else if (b[i]<>0) and(z=0) then z := b[i];
        end;
        if x<>3 then loi;
        if y<>2 then loi;
        if z<>3 then loi;
        writeln('respectable');
end.

const
        fi = '';
var
        a : array[1..2,1..8] of longint;
        i,j,p,x,y,z : longint;
        b : array[0..1000000] of longint;

procedure loi;
begin
        writeln('ugly');
        halt;
end;

begin
        assign(input,fi);
        reset(input);
        for i := 1 to 8 do
                readln(a[1,i],a[2,i]);
        close(input);
        for i := 1 to 7 do
                for j := i+1 to 8 do
                        if (a[1,i] > a[1,j]) then
                        begin
                                p := a[1,i];
                                a[1,i] := a[1,j];
                                a[1,j] := p;
                                p := a[2,i];
                                a[2,i] := a[2,j];
                                a[2,j] := p;
                        end;
        for i := 1 to 7 do
                for j := i+1 to 8 do
                        if (a[1,i] =  a[1,j]) and (a[2,i] > a[2,j]) then
                        begin
                                p := a[1,i];
                                a[1,i] := a[1,j];
                                a[1,j] := p;
                                p := a[2,i];
                                a[2,i] := a[2,j];
                                a[2,j] := p;
                        end;
        for i := 1 to 8 do
                inc(b[a[1,i]]);
        for i := 0 to 1000000 do
        begin
                if (b[i]<>0) and (x=0) then x := b[i]
                else if (b[i]<>0) and (y=0) then y := b[i]
                     else if (b[i]<>0) and(z=0) then z := b[i];
        end;
        if x<>3 then loi;
        if y<>2 then loi;
        if z<>3 then loi;
        for i := 1 to 8 do
                inc(b[a[2,i]]);
        for i := 0 to 1000000 do
        begin
                if (b[i]<>0) and (x=0) then x := b[i]
                else if (b[i]<>0) and (y=0) then y := b[i]
                     else if (b[i]<>0) and(z=0) then z := b[i];
        end;
        if x<>3 then loi;
        if y<>2 then loi;
        if z<>3 then loi;
        if (a[1,1] <> a[1,2]) or (a[1,2] <> a[1,3]) or (a[1,1] <> a[1,3]) then loi;
        if (a[2,2] <> a[1,5]) or (a[1,5] <> a[1,4]) or (a[2,2] <> a[1,4]) then loi;
        if (a[2,4] <> a[1,1]) then loi;
        if (a[2,6] <> a[1,1]) then loi;
        if (a[1,1] <> a[2,1]) then loi;
        if (a[2,7] <> a[2,2]) then loi;
        if (a[1,8] <> a[1,6]) or (a[1,6] <> a[1,7]) or (a[1,8] <> a[1,7]) then loi;
        if (a[2,8] <> a[1,8]) then loi;
        if (a[2,5] <> a[1,8]) then loi;
        if (a[2,3] <> a[1,8]) then loi;

        writeln('respectable');
end.

var i,j,t:longint;
f:boolean;
a,b,c:array [0..1000] of longint;
    procedure sort(l,r: longint);
      var
         i,j,x,y: longint;
      begin
         i:=l;
         j:=r;
         x:=c[(l+r) div 2];
         repeat
           while c[i]<x do
            inc(i);
           while x<c[j] do
            dec(j);
           if not(i>j) then
             begin
                y:=c[i];
                c[i]:=c[j];
                c[j]:=y;
                inc(i);
                j:=j-1;
             end;
         until i>j;
         if l<j then
           sort(l,j);
         if i<r then
           sort(i,r);
      end;
begin
//assign(input,'bdj.in');reset(input);
//assign(output,'bdj.out');rewrite(output);
for i:=1 to 8 do readln(a[i],b[i]);
for i:=1 to 8 do
  begin
  f:=true;
  for j:=1 to i-1 do
    if a[i]=a[j] then
      f:=false;
  if f then
    begin
    inc(t);c[t]:=a[i];
    end;
  end;
for i:=1 to 8 do
  begin
  f:=true;
  for j:=1 to i-1 do
    if b[i]=b[j] then
      f:=false;
  for j:=1 to 8 do
    if b[i]=a[j] then
      f:=false;
  if f then
    begin
    inc(t);c[t]:=b[i];
    end;
  end;
sort(1,t);
if t<>3 then writeln('ugly')
else
  begin
  f:=true;
  for i:=1 to 8 do
    if (a[i]=c[2]) and (b[i]=c[2]) then
      f:=false;
  if f then writeln('respectable')
  else writeln('ugly');
  end;
close(input);close(output);
end.

var n,i,j,x,y,p,t,w:longint;
f,e,a,b:array[0..1000000] of longint;
procedure z;
begin
writeln('ugly');close(input);close(output);halt;
end;
begin
//assign(input,'bdj.in');reset(input);
//assign(output,'bdj.out');rewrite(output);
for i:=1 to 8 do
  begin
  readln(x,y);
  if e[x]=0 then begin inc(t);a[t]:=x; end;
  if f[y]=0 then begin inc(w);b[w]:=y; end;
  inc(e[x]);inc(f[y]);
  end;
if (t<>3) or (w<>3) then z;
for i:=1 to 2 do
  for j:=i+1 to 3 do
    if a[i]>a[j] then
      begin
      p:=a[i];a[i]:=a[j];a[j]:=p;
      end;
for i:=1 to 2 do
  for j:=i+1 to 3 do
    if b[i]>b[j] then
      begin
      p:=b[i];b[i]:=b[j];b[j]:=p;
      end;
if (e[a[1]]<>3) or (f[b[1]]<>3)
or (e[a[2]]<>2) or (f[b[2]]<>2)
or (e[a[3]]<>3) or (f[b[3]]<>3) then
  z;
writeln('respectable');
close(input);close(output);
end.

var n,x,y,i,t,w:longint;flag:boolean;
a,b,c,d,h:array[0..10000] of longint;
f,e:array[0..1000001] of longint;
procedure sort;
var x,i,j:longint;
begin
for i:=1 to 2 do
  for j:=i+1 to 3 do
    if a[i]>a[j] then
      begin
      x:=a[i];a[i]:=a[j];a[j]:=x;
      end;
end;
begin
///assign(input,'bdj.in');reset(input);
//assign(output,'bdj.out');rewrite(output);
n:=8;
for i:=1 to n do
  begin
  readln(x,y);
  if f[x]=0 then begin f[x]:=1;inc(t);a[t]:=x;end;
  if e[y]=0 then begin e[y]:=1;inc(w);b[w]:=y;end;
  c[i]:=x;d[i]:=y;
  end;
if(t<>3)or(w<>3)then writeln('ugly')
else
  begin
  sort;h:=a;a:=b;
  sort;b:=a;a:=h;
  x:=a[2];y:=b[2];
  flag:=true;
  for i:=1 to n do
    if(c[i]=x)and(d[i]=y)then
      flag:=false;
  if flag then writeln('respectable')
  else writeln('ugly');
  end;
close(input);close(output);
end.

var i:longint;
a,b:array[0..10] of longint;
procedure sort(l,r: longint);
var i,j,x,y,x1: longint;
begin
i:=l;j:=r;x:=a[(l+r) div 2];x1:=b[(l+r) div 2];
repeat
while (a[i]<x) or (a[i]=x) and (b[i]<x1) do inc(i);
while (x<a[j]) or (a[j]=x) and (b[j]>x1) do dec(j);
if not(i>j) then
  begin
  y:=a[i];a[i]:=a[j];a[j]:=y;
  y:=b[i];b[i]:=b[j];b[j]:=y;
  inc(i);j:=j-1;
  end;
until i>j;
if l<j then sort(l,j);
if i<r then sort(i,r);
end;
begin
//assign(input,'bdj.in');reset(input);
//assign(output,'bdj.out');rewrite(output);
for i:=1 to 8 do readln(a[i],b[i]);
sort(1,8);
if (not((a[2]=a[1])and(a[2]=a[3])and(b[1]+1=b[2])and(b[2]+1=b[3])))
or (not((a[4]=a[5])and(b[4]+2=b[5])))
or (not((a[6]=a[7])and(a[7]=a[8])and(b[6]+1=b[7])and(b[7]+1=b[8]))) then
  begin
  writeln('ugly');close(input);close(output);halt;
  end
else writeln('respectable');
close(input);close(output);
end.

Var x,y:array [0..100] of longint;
  i,t,tt:longint;

 procedure sort(l,r: longint);
      var
         i,j,xx,yy,z: longint;
      begin
         i:=l;
         j:=r;
         xx:=x[(l+r) div 2];
         z:=y[(l+r) div 2];
         repeat
           while (x[i]<xx) or ((x[i]=xx)and (y[i]<z)) do
            inc(i);
           while (xx<x[j]) or ((xx=x[j]) and (z<y[j])) do
            dec(j);
           if not(i>j) then
             begin
                yy:=x[i];
                x[i]:=x[j];
                x[j]:=yy;

                yy:=y[i];
                y[i]:=y[j];
                y[j]:=yy;

                inc(i);
                j:=j-1;
             end;
         until i>j;
         if l<j then
           sort(l,j);
         if i<r then
           sort(i,r);
      end;

  begin
    for i:=1 to 8 do
     read(x[i],y[i]);
    sort(1,8);
    t:=round(sqrt(sqr(x[2]-x[1])+sqr(y[2]-y[1])));
    for i:=2 to 2 do
     begin
       tt:=round(sqrt(sqr(x[i+1]-x[i])+sqr(y[i+1]-y[i])));
       if tt<>t then begin writeln('ugly'); halt; end;
     end;
     for i:=4 to 4 do
      begin
         tt:=round(sqrt(sqr(x[i+1]-x[i])+sqr(y[i+1]-y[i])));
       if tt<>2*t then begin writeln('ugly'); halt; end;
      end;
      for i:=6 to 7 do
       begin
          tt:=round(sqrt(sqr(x[i+1]-x[i])+sqr(y[i+1]-y[i])));
       if tt<>t then begin writeln('ugly'); halt; end;
       end;
       writeln('respectable');
  end.

Var x,y:array [0..100] of longint;
  i,t,tt,t1,t2,t3,t4,t5,t6,t7,t8:longint;

 procedure sort(l,r: longint);
      var
         i,j,xx,yy,z: longint;
      begin
         i:=l;
         j:=r;
         xx:=x[(l+r) div 2];
         z:=y[(l+r) div 2];
         repeat
           while (x[i]<xx) or ((x[i]=xx)and (y[i]<z)) do
            inc(i);
           while (xx<x[j]) or ((xx=x[j]) and (z<y[j])) do
            dec(j);
           if not(i>j) then
             begin
                yy:=x[i];
                x[i]:=x[j];
                x[j]:=yy;

                yy:=y[i];
                y[i]:=y[j];
                y[j]:=yy;

                inc(i);
                j:=j-1;
             end;
         until i>j;
         if l<j then
           sort(l,j);
         if i<r then
           sort(i,r);
      end;

  begin
    for i:=1 to 8 do
     read(x[i],y[i]);
    sort(1,8);
    t1:=round(sqrt(sqr(x[2]-x[1])+sqr(y[2]-y[1])));
    t2:=round(sqrt(sqr(x[3]-x[2])+sqr(y[3]-y[2])));
    if t1<>t2 then begin writeln('ugly'); halt; end;
    t3:=round(sqrt(sqr(x[4]-x[1])+sqr(y[4]-y[1])));
    if t3<>t1 then begin writeln('ugly'); halt; end;
    t4:=round(sqrt(sqr(x[5]-x[4])+sqr(y[5]-y[4])));
    if t4<>2*t1 then begin writeln('ugly'); halt; end;
    t5:=round(sqrt(sqr(x[4]-x[6])+sqr(y[4]-y[6])));
    if t5<>t1 then begin writeln('ugly'); halt; end;
    t6:=round(sqrt(sqr(x[6]-x[7])+sqr(y[6]-y[7])));
    if t6<>t1 then begin writeln('ugly'); halt; end;
    t7:=round(sqrt(sqr(x[7]-x[8])+sqr(y[7]-y[8])));
    if t7<>t1 then begin writeln('ugly'); halt; end;
    t8:=round(sqrt(sqr(x[5]-x[8])+sqr(y[5]-y[8])));
    if t8<>t1 then begin writeln('ugly'); halt; end;
       writeln('respectable');
  end.

uses math;
const
  fi='';
  fo='';
var
  n:longint;
  f:text;
  x,y:array[0..9] of longint;
  i,j,maxx,maxy,minx,miny,count:longint;
  t1,t2,t3,t4,t5,t6,t:boolean;
begin
  assign(f,fi);reset(f);
  n:=8;
  read(f,x[1],y[1]);
    maxx:=x[1];
    minx:=x[1];
    maxy:=y[1];
    miny:=y[1];
  for i:=1 to n do
    begin
    read(f,x[i],y[i]);
    maxx:=max(maxx,x[i]);
    minx:=min(minx,x[i]);
    maxy:=max(maxy,y[i]);
    miny:=min(miny,y[i]);
    end;
  t1:=false;t2:=false;t3:=false;t4:=false;
  for i:=1 to n do
    begin
      if (x[i]=maxx) and (y[i]=maxy) then t1:=true;
      if (x[i]=minx) and (y[i]=miny) then t2:=true;
      if (x[i]=maxx) and (y[i]=miny) then t3:=true;
      if (x[i]=minx) and (y[i]=maxy) then t4:=true;
    end;
  t5:=false;
  t6:=false;
  for i:=minx+1 to maxx-1 do
    begin
    count:=0;
    for j:=1 to 8 do
      if (x[j]=i) and ( (y[j]=miny) or (y[j]=maxy) ) then
        inc(count);
    if count=2 then t5:=true;
    end;
  for i:=miny+1 to maxy-1 do
    begin
      count:=0;
      for j:=1 to 8 do
        if (y[j]=i) and ( (x[j]=minx) or (x[j]=maxx) ) then
          inc(count);
      if count=2 then t6:=true;
    end;
    t:=t1 and t2 and t3 and t4 and t5 and t6;
  if t=true then writeln('respectable') else writeln('ugly');
end.

{$MODE OBJFPC}
program B194;
const
  maxXY = Round(1E6);
var
  i,j,k: Integer;
  m1,m2: Integer;
  count: Integer;
  x,y,x1,y1: array [1..8] of Integer;
  frx,fry: array [0..maxXY] of Boolean;
  fr: array [1..3,1..3] of Boolean;

begin
  assign(input,''); reset(input);
  assign(output,''); rewrite(output);
  FillChar(frx,SizeOf(frx),True);
  FillChar(fry,SizeOf(fry),True);
  for i := 1 to 8 do
    begin
      readln(x[i],y[i]);
      frx[x[i]] := False;
      fry[y[i]] := False;
    end;
  for i := 0 to maxXY do
    if not frx[i] then
      begin
        Inc(m1);
        x1[m1] := i;
      end;
  for i := 0 to maxXY do
    if not fry[i] then
      begin
        Inc(m2);
        y1[m2] := i;
      end;
  FillChar(fr,SizeOf(fr),True);
  if (m1 = 3) and (m2 = 3) then
    begin
      for i := 1 to 8 do
        for j := 1 to m1 do
          for k := 1 to m2 do
            if fr[i,k] and (x[i] = x1[j]) and (y[i] = y1[k]) then
              begin
                fr[i,k] := False;
                Inc(count);
              end;
      if fr[2,2] and (count = 8) then writeln('respectable')
      else writeln('ugly')
    end
  else writeln('ugly');
  close(input);
  close(output);
end.

var
 x,y:array[0..1000000]of longint;
 xx,yy,a,b,i:longint;

 procedure No;
 begin
  writeln('ugly');
  halt;
 end;

begin
 for i:=1 to 8 do
 begin
  readln(a,b);
  inc(x[a]);
  inc(y[b]);
 end;
 for i:=0 to 1000000 do
 begin
  if (x[i]=1) or (x[i]>3) or (y[i]=1) or (y[i]>3) then No;
  if ((x[i]=2) and (xx<>1)) or ((y[i]=2) and (yy<>1)) then No;
  if x[i]=3 then inc(xx);
  if y[i]=3 then inc(yy);
 end;
 if (xx=2) and (yy=2) then writeln('respectable');
end.

var
 x,y:array[0..1000000]of longint;
 j,xx,yy,a,b,i:longint;

 procedure No;
 begin
  writeln('ugly');
  halt;
 end;

begin
// assign(input,'a.in');reset(input);
 for i:=1 to 8 do
 begin
  readln(a,b);
  inc(x[a]);
  inc(y[b]);
 end;
 for i:=1 to 8 do for j:=i+1 to 8 do if (x[i]=x[j]) and (y[i]=y[j]) then No;
 for i:=0 to 1000000 do
 begin
  if (x[i]=1) or (x[i]>3) or (y[i]=1) or (y[i]>3) then No;
  if ((x[i]=2) and (xx<>1)) or ((y[i]=2) and (yy<>1)) then No;
  if x[i]=3 then inc(xx);
  if y[i]=3 then inc(yy);
 end;
 if (xx=2) and (yy=2) then writeln('respectable');
end.

program Pasha;
Var n,i,j,f:longint;
    x,y:array[1..8]of longint;
  Begin
    for i:=1 to 8 do
     Read(x[i],y[i]);
    for i:=1 to 7 do
     for j:=i+1 to 8 do
      if (x[i]>x[j])or((x[i]=x[j])and(y[i]>y[j])) then
       begin
         f:=x[i];
         x[i]:=x[j];
         x[j]:=f;
         f:=y[i];
         y[i]:=y[j];
         y[j]:=f
       end;
    if (x[1]=x[2])and(x[2]=x[3])and
    (x[4]=x[5])and(x[6]=x[7])and(x[7]=x[8])and
    (y[1]=y[4])and(y[4]=y[6])and
    (y[2]=y[7])and(y[3]=y[5])and(y[5]=y[8])then Write('respectable')
                                           else Write('ugly')
  End.

program Pasha;
Var n,i,j,f:longint;
    x,y:array[1..8]of longint;
  Begin
    for i:=1 to 8 do
     Read(x[i],y[i]);
    for i:=1 to 7 do
     for j:=i+1 to 8 do
      if (x[i]>x[j])or((x[i]=x[j])and(y[i]>y[j])) then
       begin
         f:=x[i];
         x[i]:=x[j];
         x[j]:=f;
         f:=y[i];
         y[i]:=y[j];
         y[j]:=f
       end;
    for i:=1 to 8 do
     WriteLn(x[i],' ',y[i]);
    if (x[1]=x[2])and(x[2]=x[3])and
    (x[4]=x[5])and(x[6]=x[7])and(x[7]=x[8])and
    (y[1]=y[4])and(y[4]=y[6])and
    (y[2]=y[7])and(y[3]=y[5])and(y[5]=y[8])then Write('respectable')
                                           else Write('ugly')
  End.

Program EightPoinSets;
Const fi='';
      fo='';
var f1,f2:text;
    min,mid,max,i,nho,j,b,c,min2,max2,mid2:longint;
    kq:boolean;
    a,t:array[1..3] of longint;
    d:array[1..2,1..8]of longint;
    e,f:array[0..1000000] of boolean;

begin
        assign(f1,fi);
        assign(f2,fo);
        reset(f1);
        rewrite(f2);
        nho:=1;
        kq:=true;
        fillchar(d,sizeof(d),false);
        a[1]:=-1;
        a[2]:=-1;
        a[3]:=-1;
        t[1]:=-1;
        t[2]:=-1;
        t[3]:=-1;
        for i:=1 to 8 do
          begin
               read(f1,b,c);
               d[1,i]:=b;
               d[2,i]:=c;
               for j:=1 to i-1 do
               begin
               if (d[1,j]=d[1,i])and(d[2,j]=d[2,i]) then kq:=false;
               end;
               for j:=1 to 3 do
               begin
               if (a[j]=-1)and (e[b]=false) then
                    begin
                         a[j]:=b;
                         e[b]:=true;
                         break;
                    end;
               end;
                     if (e[b]=false) then kq:=false;
               for j:=1 to 3 do
               begin
               if (t[j]=-1)and (f[c]=false) then
                    begin
                         t[j]:=c;
                         f[c]:=true;
                         break;
                    end;
               end;
               if (f[c]=false) then kq:=false;

          end;
          if (a[1]=-1)  or (a[2]=-1) or (a[3]=-1) or (t[1]=-1)or (t[1]=-1) or (t[1]=-1) then kq:=false;
               if kq=false then
               begin
                        writeln(f2,'ugly');
               end;
          if kq=true then
                begin
                        if (a[1]<a[2])and(a[2]<a[3]) then
                        begin
                        max:=a[3];
                        mid:=a[2];
                        min:=a[1];
                        end;
                        if (a[3]<a[2])and(a[2]<a[1]) then
                        begin
                        max:=a[1];
                        mid:=a[2];
                        min:=a[3];
                        end;
                        if (a[2]<a[3])and (a[3]<a[1]) then
                        begin
                        max:=a[1];
                        mid:=a[3];
                        min:=a[2];
                        end;
                        if (a[1]<a[3])and(a[3]<a[2]) then
                        begin
                        max:=a[2];
                        mid:=a[3];
                        min:=a[1];
                        end;
                        if (a[3]<a[1]) and (a[3]<a[2]) then
                        begin
                        max:=a[2];
                        mid:=a[1];
                        min:=a[3];
                        end;
                        if (a[2]<a[1]) and (a[2]<a[3]) then
                        begin
                        max:=a[3];
                        mid:=a[1];
                        min:=a[2];
                        end;
                        if (t[1]<t[2])and(t[2]<t[3]) then
                        begin
                        max2:=t[3];
                        mid2:=t[2];
                        min2:=t[1];
                        end;
                        if (t[3]<t[2])and(t[2]<t[1]) then
                        begin
                        max2:=t[1];
                        mid2:=t[2];
                        min2:=t[3];
                        end;
                        if (t[2]<t[3])and (t[3]<t[1]) then
                        begin
                        max2:=t[1];
                        mid2:=t[3];
                        min2:=t[2];
                        end;
                        if (t[1]<t[3])and(t[3]<t[2]) then
                        begin
                        max2:=t[2];
                        mid2:=t[3];
                        min2:=t[1];
                        end;
                        if (t[3]<t[1]) and (t[3]<t[2]) then
                        begin
                        max2:=t[2];
                        mid2:=t[1];
                        min2:=t[3];
                        end;
                        if (t[2]<t[1]) and (t[2]<t[3]) then
                        begin
                        max2:=t[3];
                        mid2:=t[1];
                        min2:=t[2];
                        end;
                        for i:=1 to 8 do
                        if d[1,i]=mid then if d[2,i]=mid2 then kq:=false;
                        if kq=false then writeln(f2,'ugly') else
                        writeln(f2,'respectable');
                end;
close(f1);
close(f2);
end.

Program EightPoinSets;
Const fi='';
      fo='';
var f1,f2:text;
    min,mid,max,i,nho,j,b,c:longint;
    kq:boolean;
    a:array[1..3] of longint;
    d:array[1..2,1..8]of longint;
    e:array[0..1000000] of boolean;
begin
        assign(f1,fi);
        assign(f2,fo);
        reset(f1);
        rewrite(f2);
        nho:=1;
        kq:=true;
        fillchar(d,sizeof(d),false);
        a[1]:=-1;
        a[2]:=-1;
        a[3]:=-1;

        for i:=1 to 8 do
          begin
               read(f1,b,c);
               d[1,i]:=b;
               d[2,i]:=c;
               for j:=1 to i-1 do
               begin
               if (d[1,j]=d[1,i])and(d[2,j]=d[2,i]) then kq:=false;
               end;
               for j:=1 to 3 do
               begin
               if (a[j]=-1)and (e[b]=false) then
                    begin
                         a[j]:=b;
                         e[b]:=true;
                         break;
                    end;
               end;
                     if (e[b]=false) then kq:=false;
               if b<>c then
               for j:=1 to 3 do
               begin
               if (a[j]=-1)and (e[c]=false) then
                    begin
                         a[j]:=c;
                         e[c]:=true;
                         break;
                    end;
               end;
               if (e[c]=false) then kq:=false;

          end;
          if (a[1]=-1)  or (a[2]=-1) or (a[3]=-1) then kq:=false;
               if kq=false then
               begin
                        writeln(f2,'ugly');
               end;
          if kq=true then
                begin
                        if (a[1]<a[2])and(a[2]<a[3]) then
                        begin
                        max:=a[3];
                        mid:=a[2];
                        min:=a[1];
                        end;
                        if (a[3]<a[2])and(a[2]<a[1]) then
                        begin
                        max:=a[1];
                        mid:=a[2];
                        min:=a[3];
                        end;
                        if (a[2]<a[3])and (a[3]<a[1]) then
                        begin
                        max:=a[1];
                        mid:=a[3];
                        min:=a[2];
                        end;
                        if (a[1]<a[3])and(a[3]<a[2]) then
                        begin
                        max:=a[2];
                        mid:=a[3];
                        min:=a[1];
                        end;
                        if (a[3]<a[1]) and (a[3]<a[2]) then
                        begin
                        max:=a[2];
                        mid:=a[1];
                        min:=a[3];
                        end;
                        if (a[2]<a[1]) and (a[2]<a[3]) then
                        begin
                        max:=a[3];
                        mid:=a[1];
                        min:=a[2];
                        end;
                        for i:=1 to 8 do
                        if d[1,i]=mid then if d[2,i]=mid then kq:=false;
                        if kq=false then writeln(f2,'ugly') else
                        writeln(f2,'respectable');
                end;
close(f1);
close(f2);
end.

Program EightPoinSets;
Const fi='';
      fo='';
var f1,f2:text;
    min,mid,max,i,nho,j,b,c,min2,max2,mid2:longint;
    kq:boolean;
    a,t:array[1..3] of longint;
    d:array[1..2,1..8]of longint;
    e,f:array[0..1000000] of boolean;

begin
        assign(f1,fi);
        assign(f2,fo);
        reset(f1);
        rewrite(f2);
        nho:=1;
        kq:=true;
        fillchar(d,sizeof(d),false);
        a[1]:=-1;
        a[2]:=-1;
        a[3]:=-1;
        t[1]:=-1;
        t[2]:=-1;
        t[3]:=-1;
        for i:=1 to 8 do
          begin
               read(f1,b,c);
               d[1,i]:=b;
               d[2,i]:=c;
               for j:=1 to i-1 do
               begin
               if (d[1,j]=d[1,i])and(d[2,j]=d[2,i]) then kq:=false;
               end;
               for j:=1 to 3 do
               begin
               if (a[j]=-1)and (e[b]=false) then
                    begin
                         a[j]:=b;
                         e[b]:=true;
                         break;
                    end;
               end;
                     if (e[b]=false) then kq:=false;
               for j:=1 to 3 do
               begin
               if (t[j]=-1)and (f[c]=false) then
                    begin
                         t[j]:=c;
                         f[c]:=true;
                         break;
                    end;
               end;
               if (f[c]=false) then kq:=false;

          end;
          if (a[1]=-1)  or (a[2]=-1) or (a[3]=-1) or (t[1]=-1)or (t[1]=-1) or (t[1]=-1) then kq:=false;
               if kq=false then
               begin
                        writeln(f2,'ugly');
               end;
          if kq=true then
                begin
                        if (a[1]<a[2])and(a[2]<a[3]) then
                        begin
                        max:=a[3];
                        mid:=a[2];
                        min:=a[1];
                        end;
                        if (a[3]<a[2])and(a[2]<a[1]) then
                        begin
                        max:=a[1];
                        mid:=a[2];
                        min:=a[3];
                        end;
                        if (a[2]<a[3])and (a[3]<a[1]) then
                        begin
                        max:=a[1];
                        mid:=a[3];
                        min:=a[2];
                        end;
                        if (a[1]<a[3])and(a[3]<a[2]) then
                        begin
                        max:=a[2];
                        mid:=a[3];
                        min:=a[1];
                        end;
                        if (a[3]<a[1]) and (a[1]<a[2]) then
                        begin
                        max:=a[2];
                        mid:=a[1];
                        min:=a[3];
                        end;
                        if (a[2]<a[1]) and (a[1]<a[3]) then
                        begin
                        max:=a[3];
                        mid:=a[1];
                        min:=a[2];
                        end;
                        if (t[1]<t[2])and(t[2]<t[3]) then
                        begin
                        max2:=t[3];
                        mid2:=t[2];
                        min2:=t[1];
                        end;
                        if (t[3]<t[2])and(t[2]<t[1]) then
                        begin
                        max2:=t[1];
                        mid2:=t[2];
                        min2:=t[3];
                        end;
                        if (t[2]<t[3])and (t[3]<t[1]) then
                        begin
                        max2:=t[1];
                        mid2:=t[3];
                        min2:=t[2];
                        end;
                        if (t[1]<t[3])and(t[3]<t[2]) then
                        begin
                        max2:=t[2];
                        mid2:=t[3];
                        min2:=t[1];
                        end;
                        if (t[3]<t[1]) and (t[1]<t[2]) then
                        begin
                        max2:=t[2];
                        mid2:=t[1];
                        min2:=t[3];
                        end;
                        if (t[2]<t[1]) and (t[1]<t[3]) then
                        begin
                        max2:=t[3];
                        mid2:=t[2];
                        min2:=t[1];
                        end;
                        for i:=1 to 8 do
                        if d[1,i]=mid then if d[2,i]=mid2 then kq:=false;
                        if kq=false then writeln(f2,'ugly') else
                        writeln(f2,'respectable');
                end;
close(f1);
close(f2);
end.

var
  x,y : array[1..8]of longint;
  k,i,j : longint;
begin
  for i:=1 to 8 do readln(x[i],y[i]);
  for i:=1 to 8 do
  for j:=i+1 to 8 do
    begin
      if (x[j]<x[i])
      or ((x[j]=x[i]) and (y[j]<y[i])) then
        begin
          k:=x[i]; x[i]:=x[j]; x[j]:=k;
          k:=y[i]; y[i]:=y[j]; y[j]:=k;
        end;
    end;
  if  (x[1]=x[2]) and (x[2]=x[3]) and (x[3]<x[4])
  and (x[4]=x[5]) and (x[5]<x[6]) and (x[6]=x[7])
  and (x[7]=x[8]) and (y[1]<y[2]) and (y[2]<y[3])
  and (y[4]=y[1]) and (y[5]=y[3]) and (y[6]=y[1])
  and (y[7]=y[2]) and (y[8]=y[3]) then writeln('respectable')
  else writeln('uglye');
end.

const
  inf='b.in';
  outf='b.out';
var
  i,j,uu,vv:longint;
  x,y,u,v:array[1..100] of longint;
  a,b:array[0..1000000] of boolean;
procedure swap(var x,y:longint);
var
  z:longint;
begin
  z:=x; x:=y; y:=z;
end;
function main:boolean;
begin
  for i:=1 to 8 do begin
    read(x[i],y[i]);
    if not a[x[i]] then begin
      a[x[i]]:=true;
      inc(uu);
      u[uu]:=x[i];
    end;
    if not b[y[i]] then begin
      b[y[i]]:=true;
      inc(vv);
      v[vv]:=y[i];
    end;
  end;
  if uu<>3 then exit(false);
  if vv<>3 then exit(false);
  for i:=1 to 3 do
    for j:=i+1 to 3 do if u[i]>u[j] then swap(u[i],u[j]);
  for i:=1 to 3 do
    for j:=i+1 to 3 do if v[i]>v[j] then swap(v[i],v[j]);
  for i:=1 to 8 do if (x[i]=u[2]) and (y[i]=v[2]) then exit(false);
  exit(true);
end;
begin
  if main then writeln('respectable') else writeln('ugly');
end.

program probb;
var
	a:array[1..8,1..2] of longint;
	i,j,k,n,x,y:longint;
begin
	for i:=1 to 8 do begin
		readln(a[i,1],a[i,2]);
		x:=x+a[i,1]; y:=y+a[i,2];
	end;
	x:=x div 8; y:=y div 8;
	for i:=1 to 7 do
		for j:=i+1 to 8 do
			if (a[i,1]>a[j,1])or((a[i,1]=a[j,1])and(a[i,2]>a[j,2])) then begin
				k:=a[i,1]; a[i,1]:=a[j,1]; a[j,1]:=k;
				k:=a[i,2]; a[i,2]:=a[j,2]; a[j,2]:=k;
			end;
	x:=a[4,1]; y:=a[2,2];
	{if ((a[4,1]-a[1,1])<>(a[6,1]-a[4,1])) then begin writeln('ugly'); exit; end;
	if ((x-a[2,1])<>(a[7,1]-x)) then begin writeln('ugly'); exit; end;
	if ((a[5,1]-a[3,1])<>(a[8,1]-a[5,1])) then begin writeln('ugly'); exit; end;}
	if (a[1,1]<>a[2,1])or(a[2,1]<>a[3,1]) then begin writeln('ugly'); exit; end;
	if (a[4,1]<>x)or(x<>a[5,1]) then begin writeln('ugly'); exit; end;
	if (a[6,1]<>a[7,1])or(a[7,1]<>a[8,1]) then begin writeln('ugly'); exit; end;

	{if ((a[2,2]-a[1,2])<>(a[3,2]-a[2,2])) then begin writeln('ugly'); exit; end;
	if ((y-a[4,2])<>(a[5,2]-y)) then begin writeln('ugly'); exit; end;
	if ((a[7,2]-a[6,2])<>(a[8,2]-a[7,2])) then begin writeln('ugly'); exit; end;}
	if (a[1,2]<>a[4,2])or(a[4,2]<>a[6,2]) then begin writeln('ugly'); exit; end;
	if (a[2,2]<>y)or(y<>a[7,2]) then begin writeln('ugly'); exit; end;
	if (a[3,2]<>a[5,2])or(a[5,2]<>a[8,2]) then begin writeln('ugly'); exit; end;

	writeln('respectable');
end.

program probb;
var
	a:array[1..8,1..2] of longint;
	i,j,k,n,x,y:longint;
begin
	for i:=1 to 8 do begin
		readln(a[i,1],a[i,2]);
		x:=x+a[i,1]; y:=y+a[i,2];
	end;
	x:=x div 8; y:=y div 8;
	for i:=1 to 7 do
		for j:=i+1 to 8 do
			if (a[i,1]>a[j,1])or((a[i,1]=a[j,1])and(a[i,2]>a[j,2])) then begin
				k:=a[i,1]; a[i,1]:=a[j,1]; a[j,1]:=k;
				k:=a[i,2]; a[i,2]:=a[j,2]; a[j,2]:=k;
			end;
	{if ((a[4,1]-a[1,1])<>(a[6,1]-a[4,1])) then begin writeln('ugly'); exit; end;
	if ((x-a[2,1])<>(a[7,1]-x)) then begin writeln('ugly'); exit; end;
	if ((a[5,1]-a[3,1])<>(a[8,1]-a[5,1])) then begin writeln('ugly'); exit; end;}
	if (a[1,1]<>a[2,1])or(a[2,1]<>a[3,1]) then begin writeln('ugly'); exit; end;
	if (a[4,1]<>x)or(x<>a[5,1]) then begin writeln('ugly'); exit; end;
	if (a[6,1]<>a[7,1])or(a[7,1]<>a[8,1]) then begin writeln('ugly'); exit; end;

	{if ((a[2,2]-a[1,2])<>(a[3,2]-a[2,2])) then begin writeln('ugly'); exit; end;
	if ((y-a[4,2])<>(a[5,2]-y)) then begin writeln('ugly'); exit; end;
	if ((a[7,2]-a[6,2])<>(a[8,2]-a[7,2])) then begin writeln('ugly'); exit; end;}
	if (a[1,2]<>a[4,2])or(a[4,2]<>a[6,2]) then begin writeln('ugly'); exit; end;
	if (a[2,2]<>y)or(y<>a[7,2]) then begin writeln('ugly'); exit; end;
	if (a[3,2]<>a[5,2])or(a[5,2]<>a[8,2]) then begin writeln('ugly'); exit; end;

	writeln('respectable');
end.

program probb;
var
	a:array[1..8,1..2] of longint;
	i,j,k,n,x,y:longint;
begin
	for i:=1 to 8 do begin
		readln(a[i,1],a[i,2]);
		x:=x+a[i,1]; y:=y+a[i,2];
	end;
	x:=x div 8; y:=y div 8;
	for i:=1 to 7 do
		for j:=i+1 to 8 do
			if (a[i,1]>a[j,1])or((a[i,1]=a[j,1])and(a[i,2]>a[j,2])) then begin
				k:=a[i,1]; a[i,1]:=a[j,1]; a[j,1]:=k;
				k:=a[i,2]; a[i,2]:=a[j,2]; a[j,2]:=k;
			end;
	if ((a[4,1]-a[1,1])<>(a[6,1]-a[4,1])) then begin writeln('ugly'); exit; end;
	if ((x-a[2,1])<>(a[7,1]-x)) then begin writeln('ugly'); exit; end;
	if ((a[5,1]-a[3,1])<>(a[8,1]-a[5,1])) then begin writeln('ugly'); exit; end;
	if (a[1,1]<>a[2,1])or(a[2,1]<>a[3,1]) then begin writeln('ugly'); exit; end;
	if (a[4,1]<>x)or(x<>a[5,1]) then begin writeln('ugly'); exit; end;
	if (a[6,1]<>a[7,1])or(a[7,1]<>a[8,1]) then begin writeln('ugly'); exit; end;

	if ((a[2,2]-a[1,2])<>(a[3,2]-a[2,2])) then begin writeln('ugly'); exit; end;
	if ((y-a[4,2])<>(a[5,2]-y)) then begin writeln('ugly'); exit; end;
	if ((a[7,2]-a[6,2])<>(a[8,2]-a[7,2])) then begin writeln('ugly'); exit; end;
	if (a[1,2]<>a[4,2])or(a[4,2]<>a[6,2]) then begin writeln('ugly'); exit; end;
	if (a[2,2]<>y)or(y<>a[7,2]) then begin writeln('ugly'); exit; end;
	if (a[3,2]<>a[5,2])or(a[5,2]<>a[8,2]) then begin writeln('ugly'); exit; end;

	writeln('respectable');
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
 x,y:array [1..8] of integer;
 i,j,t1,t2:integer;
 f:boolean;
begin
  {assign(Input,'in.txt');
  reset(Input);
  Assign(Output,'out.txt');
  Rewrite(Output); }
  for i:=1 to 8 do
   readln(x[i],y[i]);
  for i:= 1 to 7 do
   for j:=i+1 to 8 do
    if x[i]>x[j] then
    begin
      t1:=x[i];
      x[i]:=x[j];
      x[j]:=t1;
      t2:=y[i];
      y[i]:=y[j];
      y[j]:=t2;
    end;
   f:=true;
   if  (x[1]<>x[2]) or (x[1]<>x[3])
   or  (x[4]<>x[5])
   or  (x[6]<>x[7]) or (x[6]<>x[8]) then f:=false;
   if f then
   begin
    for i:=1 to 2 do
     for j:=i+1 to 3 do
      if y[i]>y[j] then
      begin
       t2:=y[i];
       y[i]:=y[j];
       y[j]:=t2;
      end;

     if y[4]>y[5] then
     begin
       t2:=y[4];
       y[4]:=y[5];
       y[5]:=t2;
     end;

     for i:=6 to 7 do
     for j:=i+1 to 8 do
      if y[i]>y[j] then
      begin
       t2:=y[i];
       y[i]:=y[j];
       y[j]:=t2;
      end;
    f:= (y[1]=y[4]) and (y[1]=y[6])
    and (y[2]=y[7])
    and (y[3]=y[5]) and (y[3]=y[8]);
   end;
   if f then writeln ('respectable')
   else writeln('ugly');
   readln;
end.

program Project334b;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  X:array[1..8] of Integer;
  Y:array[1..8] of Integer;
  povt:array[1..8] of Byte;
  max,min,k,i,j:Integer;
  begin
  i:=1;
  while i<=8 do
   begin
     read(x[i]);
     Read(y[i]);    readln;
     Inc(i);
   end;

  for i:=1 to 7 do
   begin
    min:=x[i];
    max:=y[i];
    for j:=i+1 to 8 do
    if min>x[j] then
     begin
      min:=x[j];
      max:=y[j];
      k:=j;
       x[k]:=x[i];
     x[i]:=min;
     y[k]:=y[i];
     y[i]:=max;
      end;

    end;
    k:=1;
    if (x[1]=x[2]) and (x[2]=x[3]) and  (x[4]=x[5])  and (x[6]=x[7]) and (x[7]=x[8]) and (x[1]<>x[4]) and (x[1]<>x[8]) and (x[4]<>x[8])  then
    begin
     k:=0;

    max:=y[1];
    min:=y[1];
    for i:=1 to 5 do
    begin
    if y[i]<min
     then min:=y[i];
    if y[i]>max
    then max:=y[i];
     for j:=6 to 8 do
      if y[i]=y[j] then
      begin
      Inc(povt[i]);
      inc(povt[j]);
      end;
      end;

      for i:=1 to 5 do
      if povt[i]<>1
        then k:=1;
      for I:=6 to 8 do
      if povt[i]>2 then k:=1;
      if k=0 then
      begin
        if (y[4]=max) and (y[5]=min) then k:=0 else
        if (y[5]=max) and (y[4]=min) then k:=0 else k:=1;
       end;
      end;
    if k=0 then write('rspecteble') else write('ugly') ;       Readln;
end.

var
  X:array[1..8] of Integer;
  Y:array[1..8] of Integer;
  povt:array[1..8] of Byte;
  max,min,k,i,j:Integer;
  begin
  i:=1;
  while i<=8 do
   begin
     read(x[i]);
     Read(y[i]);    readln;
     Inc(i);
   end;

  for i:=1 to 7 do
   begin
    min:=x[i];
    max:=y[i];
    for j:=i+1 to 8 do
    if min>x[j] then
     begin
      min:=x[j];
      max:=y[j];
      k:=j;
       x[k]:=x[i];
     x[i]:=min;
     y[k]:=y[i];
     y[i]:=max;
      end;

    end;
    k:=1;
    if (x[1]=x[2]) and (x[2]=x[3]) and  (x[4]=x[5])  and (x[6]=x[7]) and (x[7]=x[8]) and (x[1]<>x[4]) and (x[1]<>x[8]) and (x[4]<>x[8])  then
    begin
     k:=0;

    max:=y[1];
    min:=y[1];
    for i:=1 to 5 do
    begin
    if y[i]<min
     then min:=y[i];
    if y[i]>max
    then max:=y[i];
     for j:=6 to 8 do
      if y[i]=y[j] then
      begin
      Inc(povt[i]);
      inc(povt[j]);
      end;
      end;

      for i:=1 to 5 do
      if povt[i]<>1
        then k:=1;
      for I:=6 to 8 do
      if povt[i]>2 then k:=1;
      if k=0 then
      begin
        if (y[4]=max) and (y[5]=min) then k:=0 else
        if (y[5]=max) and (y[4]=min) then k:=0 else k:=1;
       end;
      end;
    if k=0 then write('rspecteble') else write('ugly') ;
end.

                            {$APPTYPE CONSOLE}
type int64=longint;
                            const  besk=100000000000000;
   nnn=2000000;  eps=1e-13;
 label 1,2,3,4;
var i,k,nn,n,i10,i100,n1,dl,kol,ii,jj,i3,i2,i1,j1,k1,kt,ppp,mask,i0,j0,step,j,start,finish:longint;
t,p,m1,pl,sum,p1,p2,m,k2,r,cc,ot,aa,bb,ka,kd,ll,rr,d1,d2,kolvyk,q,t1,t2,modul,pp,tt,ot1,ot2,s,kold,kkr:int64;
mon1,mon2,day1,day2,god1,god2,plus,kk,mnog,koef:int64;
fl0,fl10,fl100,flag2,flag1,flag:boolean;
ott,pp1,pp2,dl1,dl2,dl3,hh,po,pt,doltek,dolpred:extended;
dx,dy,b,a,c:array[-1000..200000] of int64;

xx1,xx2,yy1,yy2,x1,x2,y1,y2,xx,yy,z1,z,x,y: array[-10..5000] of int64;
gr1,gr: array[-50..1050,-50..1050] of int64;
a2,deg,marked:array[-100000..250000] of int64;
dd:array[-10..5001,-10..5001] of longint;
{ss:array[0..2000000] of char; }
sss:string;
ab:array[-100..200,-100..201,-100..201] of char;
ch11,ch12,ch1,ch:char;
sl,sr,str :array[-10 ..200000] of int64;
ssot:array[-1000..1100000] of char;
fact:array[0..100] of extended;
name:array[0..2000] of string;
function min (a,b:int64):int64;begin min:=b;if a<b then min:=a;  end;
function max (a,b:int64):int64;begin max:=b;if a>b then max:=a;  end;

    function nod(a,b:int64):int64; var p,t:int64;
begin if (a>0)and(b>0) then
   begin while (b>0) do begin t:=a mod b;a:=b;b:=t;    end;
    p:=a;
   end else if a=0 then p:=b else p:=a;
nod:=p;
end;

function degg(a,k:int64):int64; var p:int64;
begin
 if k=0 then degg:=1 else if odd(k) then degg:=degg(a,k-1)*a mod modul else
   begin  p:=degg(a,k div 2); degg:=p*p mod modul;   end;

end;

function good(ur:int64):boolean;  var p,i1,i2,i,j,k:longint; fl:boolean;
  begin
    fl:=false;
    for i:=1 to n do for j:=1 to m do if gr[i,j]>=ur then gr1[i,j]:=1 else gr1[i,j]:=0;
    for i1:=1 to n do for i2:=i1+1 to n do
      begin
        p:=0;
        for j:=1 to m do a[j]:=min(gr1[i1,j],gr1[i2,j]);
        for j:=1 to m do p:=p+a[j];
        if p>=2 then fl:=true;
      end;
    good:=fl;
  end;
begin
 {  assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
  }
                              modul:=1000000007 ;

 for i:=1 to 8 do read(x[i],y[i]);
 for i:=1 to 8 do x[i]:=2000000*x[i]+y[i];
{for i:=1 to 8 do write(x[i],' '); writeln;
}for i:=1 to 8 do for j:=1 to 7 do if x[j]>x[j+1] then
 begin t:=x[j]; x[j]:=x[j+1]; x[j+1]:=t;    end;
{for i:=1 to 8 do write(x[i],' '); writeln;
}for i:=1 to 8 do begin  y[i]:=x[i] mod 2000000;  x[i]:=x[i] div 2000000;     end;

{for i:=1 to 8 do writeln(x[i],' ',y[i]);
}flag:=true;
if (x[1]<>x[2])or(x[2]<>x[3]) then flag:=false;
if (x[6]<>x[7])or(x[7]<>x[8]) then flag:=false;
if x[4]<>x[5] then flag:=false;

if (y[1]<>y[4])or(y[4]<>y[6]) then flag:=false;
if (y[3]<>y[5])or(y[5]<>y[8]) then flag:=false;
if y[2]<>y[7] then flag:=false;

if flag then write('respectable' ) else write('ugly');

   1:          close(output);

end.

                            {$APPTYPE CONSOLE}
type int64=longint;
                            const  besk=100000000000000;
   nnn=2000000;  eps=1e-13;
 label 1,2,3,4;
var i,k,nn,n,i10,i100,n1,dl,kol,ii,jj,i3,i2,i1,j1,k1,kt,ppp,mask,i0,j0,step,j,start,finish:longint;
t,p,m1,pl,sum,p1,p2,m,k2,r,cc,ot,aa,bb,ka,kd,ll,rr,d1,d2,kolvyk,q,t1,t2,modul,pp,tt,ot1,ot2,s,kold,kkr:int64;
mon1,mon2,day1,day2,god1,god2,plus,kk,mnog,koef:int64;
fl0,fl10,fl100,flag2,flag1,flag:boolean;
ott,pp1,pp2,dl1,dl2,dl3,hh,po,pt,doltek,dolpred:extended;
dx,dy,b,a,c:array[-1000..200000] of int64;

xx1,xx2,yy1,yy2,x1,x2,y1,y2,xx,yy,z1,z,x,y: array[-10..5000] of int64;
gr1,gr: array[-50..1050,-50..1050] of int64;
a2,deg,marked:array[-100000..250000] of int64;
dd:array[-10..5001,-10..5001] of longint;
{ss:array[0..2000000] of char; }
sss:string;
ab:array[-100..200,-100..201,-100..201] of char;
ch11,ch12,ch1,ch:char;
sl,sr,str :array[-10 ..200000] of int64;
ssot:array[-1000..1100000] of char;
fact:array[0..100] of extended;
name:array[0..2000] of string;
function min (a,b:int64):int64;begin min:=b;if a<b then min:=a;  end;
function max (a,b:int64):int64;begin max:=b;if a>b then max:=a;  end;

    function nod(a,b:int64):int64; var p,t:int64;
begin if (a>0)and(b>0) then
   begin while (b>0) do begin t:=a mod b;a:=b;b:=t;    end;
    p:=a;
   end else if a=0 then p:=b else p:=a;
nod:=p;
end;

function degg(a,k:int64):int64; var p:int64;
begin
 if k=0 then degg:=1 else if odd(k) then degg:=degg(a,k-1)*a mod modul else
   begin  p:=degg(a,k div 2); degg:=p*p mod modul;   end;

end;

function good(ur:int64):boolean;  var p,i1,i2,i,j,k:longint; fl:boolean;
  begin
    fl:=false;
    for i:=1 to n do for j:=1 to m do if gr[i,j]>=ur then gr1[i,j]:=1 else gr1[i,j]:=0;
    for i1:=1 to n do for i2:=i1+1 to n do
      begin
        p:=0;
        for j:=1 to m do a[j]:=min(gr1[i1,j],gr1[i2,j]);
        for j:=1 to m do p:=p+a[j];
        if p>=2 then fl:=true;
      end;
    good:=fl;
  end;
begin
  { assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
   }
                              modul:=1000000007 ;

 for i:=1 to 8 do read(x[i],y[i]);
 for i:=1 to 8 do x[i]:=2000000*x[i]+y[i];
{for i:=1 to 8 do write(x[i],' '); writeln;
}for i:=1 to 8 do for j:=1 to 7 do if x[j]>x[j+1] then
 begin t:=x[j]; x[j]:=x[j+1]; x[j+1]:=t;    end;
{for i:=1 to 8 do write(x[i],' '); writeln;
}for i:=1 to 8 do begin  y[i]:=x[i] mod 2000000;  x[i]:=x[i] div 2000000;     end;

{for i:=1 to 8 do writeln(x[i],' ',y[i]);
}flag:=true;
if (x[1]<>x[2])or(x[2]<>x[3]) then flag:=false;
if (x[6]<>x[7])or(x[7]<>x[8]) then flag:=false;
if x[4]<>x[5] then flag:=false;

if (y[1]<>y[4])or(y[4]<>y[6]) then flag:=false;
if (y[3]<>y[5])or(y[5]<>y[8]) then flag:=false;
if y[2]<>y[7] then flag:=false;

if (x[1]=x[4])or(x[4]=x[6]) then flag:=false;
if (y[1]=y[2])or(y[2]=y[3]) then flag:=false;

if flag then write('respectable' ) else write('ugly');

   1:          close(output);

end.

{$R+,Q+,I+}
{$apptype console}
Uses SysUtils,math;
Var
   x,y,a,b:Array[0..30] of Integer;
   used:Array[0..30,0..30] of Boolean;
   i,j,i1,j1,k1,i2,j2,k2,i3,j3,f,t,k:Integer;
Begin
   For i:=1 To 8 Do Read(x[i],y[i]);
   For i1:=1 To 6 Do
      For j1:=i1+1 To 7 Do
         For k1:=j1+1 To 8 Do
            If (x[i1]<>x[j1]) and (x[j1]<>x[k1]) Then Begin
               For i2:=1 To 6 Do
                  For j2:=i2+1 To 7 Do
                     For k2:=j2+1 To 8 Do
                        If (y[i2]<>y[j2]) and (y[j2]<>y[k2]) Then Begin
                           For i:=1 To 8 Do
                              For j:=1 To 8 Do used[i,j]:=false;
                           a[1]:=x[i1];
                           a[2]:=x[j1];
                           a[3]:=x[k1];
                           For i:=1 To 2 Do
                              For j:=i+1 To 3 Do
                                 If a[i]>a[j] Then Begin
                                    t:=a[i];
                                    a[i]:=a[j];
                                    a[j]:=t;
                                 End;
                           b[1]:=y[i2];
                           b[2]:=y[j2];
                           b[3]:=y[k2];
                           For i:=1 To 2 Do
                              For j:=i+1 To 3 DO
                                 If b[i]>b[j] Then Begin
                                    t:=b[i];
                                    b[i]:=b[j];
                                    b[j]:=t;
                                 End;
                           f:=1;
                           k:=0;
                           For i:=1 To 8 Do
                              For i3:=1 To 3 Do
                                 For j3:=1 To 3 Do
                                    If (x[i]=a[i3]) and (y[i]=b[j3]) Then Begin
                                       If ((i3=2) and (j3=2)) or (used[i3,j3]) Then f:=0;
                                       used[i3,j3]:=true;
                                       k:=k+1;
                                    End;
                        If (f=1) or (k<>8) Then Begin
                              Write('respectable');
                              Halt;
                           End;
                        End;
            End;
   Write('ugly');
End.

{$R+,Q+,I+}
{$apptype console}
Uses SysUtils,math;
Var
   x,y,a,b:Array[0..30] of Integer;
   used:Array[0..30,0..30] of Boolean;
   i,j,i1,j1,k1,i2,j2,k2,i3,j3,f,t:Integer;
Begin
   For i:=1 To 8 Do Read(x[i],y[i]);
   For i1:=1 To 6 Do
      For j1:=i1+1 To 7 Do
         For k1:=j1+1 To 8 Do
            If (x[i1]<>x[j1]) and (x[j1]<>x[k1]) Then Begin
               For i2:=1 To 6 Do
                  For j2:=i2+1 To 7 Do
                     For k2:=j2+1 To 8 Do
                        If (y[i2]<>y[j2]) and (y[j2]<>y[k2]) Then Begin
                           For i:=1 To 8 Do
                              For j:=1 To 8 Do used[i,j]:=false;
                           a[1]:=x[i1];
                           a[2]:=x[j1];
                           a[3]:=x[k1];
                           For i:=1 To 2 Do
                              For j:=i+1 To 3 Do
                                 If a[i]>a[j] Then Begin
                                    t:=a[i];
                                    a[i]:=a[j];
                                    a[j]:=t;
                                 End;
                           b[1]:=y[i2];
                           b[2]:=y[j2];
                           b[3]:=y[k2];
                           For i:=1 To 2 Do
                              For j:=i+1 To 3 DO
                                 If b[i]>b[j] Then Begin
                                    t:=b[i];
                                    b[i]:=b[j];
                                    b[j]:=t;
                                 End;
                           f:=1;
                           For i:=1 To 8 Do
                              For i3:=1 To 3 Do
                                 For j3:=1 To 3 Do
                                    If (x[i]=a[i3]) and (y[i]=b[j3]) Then Begin
                                       If ((i3=2) and (j3=2)) or (used[i3,j3]) Then f:=0;
                                       used[i3,j3]:=true;
                                    End;
                           If f=1 Then Begin
                              Write('respectable');
                              Halt;
                           End;
                        End;
            End;
   Write('ugly');
End.

program Project1;

{$APPTYPE CONSOLE}

uses  SysUtils;
var mas: array [1..2, 1..8] of Integer;
    x,y,x1,x2, i,j,t : Integer;
    f: Boolean;
begin
  { TODO -oUser -cConsole Main : Insert code here }
  f := False;
  for i:=1 to 8 do Readln(mas[1,i],  mas[2,i]);
  for i:=8 downto 2 do
    for j:=1 to i-1 do
      if   (mas[1,j]>mas[1,j+1]) or ((mas[1,j]=mas[1,j+1])and(mas[2,j]>mas[2,j+1]))  then
      begin
         t:=mas[1,j];  mas[1, j]:=mas[1,j+1];   mas[1,j+1]:=t;
         t:=mas[2,j];  mas[2, j]:=mas[2,j+1];   mas[2,j+1]:=t;
      end;

 // for i:=1 to 8 do
 //   writeln(mas[1,i], '  ', mas[2,i]);

 if (mas[1,1]=mas[1,2])and(mas[1,1]=mas[1,3]) then
   if  (mas[1,4]=mas[1,5]) then
     if  (mas[1,6]=mas[1,7])and(mas[1,6]=mas[1,8]) then
       if  (mas[2,1]=mas[2,4]) and  (mas[2,1]=mas[2,6]) then
         if  (mas[2,2]=mas[2,7])   then
           if  (mas[2,3]=mas[2,5])and(mas[2,3]=mas[2,8]) then  f:=True;

 if f then Writeln('respectable') else writeln('ugly');

end.