blob: f9c823a4483893235c1daca11cf0d10426389301 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
uses clib;
var
n, i: int16;
a, b: array of int64;
begin
readln(n);
setlength(a, n);
for i := 0 to n - 1 do
read(a[i]);
qsort(a);
setlength(b, n);
for i := 0 to n - 1 do
read(b[i]);
qsort(b);
for i := 0 to n - 1 do
if a[i] <> b[i] then
begin
writeln('NO');
exit
end;
writeln('YES')
end.
|