#include <bits/stdc++.h>

#define clr(x) memset((x), 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define mp make_pair
#define For(i, st, en) for(int i=(st); i<=(int)(en); i++)
#define Ford(i, st, en) for(int i=(st); i>=(int)(en); i--)
#define forn(i,m,n) for(int i=m; i<(int)(n); i++)
#define forn2(i, n) for(int i=0; i<=(int)(n); i++)
#define ford(i, n) for(int i=(n)-1; i>=0; i--)
#define fori(it, x) for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define in(x) int (x); input((x));
#define x first
#define y second
#define less(a,b) ((a) < (b) - EPS)
#define more(a,b) ((a) > (b) + EPS)
#define eq(a,b) (fabs((a) - (b)) < EPS)
#define remax(a, b) ((a) = (b) > (a) ? (b) : (a))
#define remin(a, b) ((a) = (b) < (a) ? (b) : (a))
#define salfinal(x) cout<<x<<endl;
using namespace std;
const int MAX =1e5+1;

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    /*
	freopen("s.txt","r",stdin);
	freopen("sa.txt","w",stdout);
    */
    int ent,remover;
    cin>>ent>>remover;
    vector<int>v(ent);
    for(int &i:v)cin>>i;
    if(v[0]!=remover)cout<<v[0];
    forn(i,1,ent)if(v[i]!=remover)cout<<" "<<v[i];
    cout<<"\n";
    return 0;
}

#include<bits/stdc++.h>
#define ll long long int
#define pragi(a,b) for(ll i = a;i<b;i++)
#define pragj(a,b) for(ll j = a;j<b;j++)
#define pragk(a,b) for(ll k = a;k>=b;k--)
#define all(v) (v.begin(),v.end())
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define MP make_pair
#define MT make_tuple
#define F first
#define S second
#define KAKA ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;
const int mod = 1e9 + 9;
 
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<bool> vb;
typedef long double ld;
typedef pair<int, int> pii;
//typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<vvl> vvvl;
typedef pair<ll, ll> pll;

int main()
{
  KAKA
  ll n;
  cin>>n;
  vector<ll> a(n),b(n);
  pragi(0,n)
  {
    cin>>a[i];
  }
  pragi(0,n)
  {
    cin>>b[i];
  }
  ll sum = 0;
  pragi(0,n)
  {
    sum += (a[i] * b[i]);
  }
  if(sum == 0) cout<<"Yes"<<"\n";
  else cout<<"No"<<"\n";
}