uses crt,math;
var a,b,x:array[0..100000] of real;
g:array[0..100000] of byte;
i,n,n1,n2:longword;
procedure sort(l,r:longword;var a:array of real);
var i,j:longword;
x,t:real;
begin
i:=l;j:=r;x:=a[(l+r) div 2];
repeat
while a[i] > x do inc(i);
while a[j] < x do dec(j);
if i<=j then
begin
t:=a[i];a[i]:=a[j];a[j]:=t;
inc(i);dec(j);
end;
until i>j;
if l < j then sort(l,j,a);
if i < r then sort(i,r,a);
end;
begin
clrscr;
readln(n);
for i:=1 to n do read(g[i]);
for i:=1 to n do read(x[i]);
n1:=0;n2:=0;
for i:=1 to n do
begin
if g[i]=1 then
begin
inc(n1);
a[n1]:=x[i];
end
else
begin
inc(n2);
b[n2]:=x[i];
end;
end;
sort(1,n1,a);
sort(1,n2,b);
i:=1;
while (a[i]>=1.6) and (b[i]>=1.55) and (i<=min(n1,n2)) do
begin
writeln(a[i]:0:2,'-',b[i]:0:2);
inc(i);
end;
if wherey=4 then writeln('NULL');
readln;readln;
end.