var
p1, p2, buf: real;
n: byte;
begin
readln(n);
for i: byte := 1 to n do
begin
readln(buf);
if (buf > 0) then
if (p2 = 0) then
p2 := buf
else
p2 := p2 * buf
else
if (p1 = 0) then
p1 := buf
else
p1 := p1 * buf;
end;
writeln('P1 = ', p1, #13, 'P2 = ', p2);
if (abs(p1) > abs(p2)) then
writeln('|', p1, '| > |', p2, '|')
else
if (abs(p1) < abs(p2)) then
writeln('|', p1, '| < |', p2, '|')
else
writeln('|', p1, '| = |', p2, '|')
end.