using System;
using System.Linq;
class Program
{
static void Main() {
int[] arr1 = { 1, 3, 8, 5, 9, 2, 7 };
int[] arr2 = { 2, 9, 1, 8, 2, 5, 7 };
bool equals = arr1.OrderBy(a => a).SequenceEqual(arr2.OrderBy(a => a));
if (equals)
Console.WriteLine("Yes");
else
Console.WriteLine("No");
}
}
/*
run:
No
*/