#include
#include
#include
using namespace std;
int main() {
int n;
out << "Vvedite n: ";<br> cin >> n;
vector a(n), b(n);
cout << "Vvedite posl A: ";<br> for (int i = 0; i < n; ++i) cin >> a[i];
cout << "Vvedite posl B: ";<br> for (int i = 0; i < n; ++i) cin >> b[i];
sort(a.begin(), a.end());
sort(b.begin(), b.end());
cout << ((a == b) ? "Yes" : "No");<br> return 0;
}