#include "bits/stdc++.h"

#define MOD 1000000007
#define rep(i, n) for(ll i=0; i < (n); i++)
#define rrep(i, n) for(ll i=(n)-1; i >=0; i--)
#define ALL(v) v.begin(),v.end()
#define rALL(v) v.rbegin(),v.rend()
#define FOR(i, j, k) for(ll i=j;i<k;i++)
#define debug_print(var) cerr << #var << "=" << var <<endl;
#define DUMP(i, v)for(ll i=0;i<v.size();i++)cerr<<v[i]<<" "
#define fi first
#define se second

using namespace std;
typedef long long int ll;
typedef vector<ll> llvec;
typedef vector<double> dvec;
typedef pair<ll, ll> P;
typedef long double ld;
struct edge{ll x, c;};

/**************************************
** A main function starts from here  **
***************************************/
int main(){
  ll N, M;
  cin >> N >> M;
  vector<P> v(1e3+1, {0, 0});
  rep(i, N){
    ll a;
    cin >> a;
    v[a].fi++;
  }
  rep(i, M){
    ll a;
    cin >> a;
    v[a].se++;
  }

  rep(i, 1e3){
    if((v[i+1].fi xor v[i+1].se) == 1){
      cout << i + 1 << " ";
    }
  }
  
  return 0;
}

#include<bits/stdc++.h>
#include<stdio.h>
#include<queue>
#define ll long long
#define ull unsigned long long
#define ln "\n"
using namespace std;
#define dbg(x) cout<<#x<<" = "<<x<<" "
#define rep(i,s,n) for(ll i = (s);i<(n);++i)
 
void solve(){
 ll n;
 cin>>n;
 vector<ll>cnt(n+1,0);
 for(int i=0;i<n;i++)
 {
     cnt[i+1]++;
 }
 for(int i=0;i<n;i++)
 {
     ll x;
     cin>>x;
     cnt[x]--;
 }
 string ans="Yes";
 for(int i=0;i<n;i++)
 {
     if(cnt[i+1]!=0) 
     {
         ans="No";
         break;
     }
 }
 cout<<ans<<ln;
}
 
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);    
    int test=1;
   // cin>>test;   
    while(test--)
        solve();
    return 0;
}

