#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main() {
  int n, m, x, y;
  cin >> n >> m >> x >> y;
  vector<int> xv(n);
  vector<int> yv(m);
  int xmax = x;
  int ymin = y;
  rep(i, n) {
    cin >> xv[i];
    xmax = max(xmax, xv[i]);
  }
  rep(i, m) {
    cin >> yv[i];
    ymin = min(ymin, yv[i]);
  }
  
  if(xmax < ymin) cout << "No War" << endl;
  else cout << "War" << endl;
  return 0;
}
    
#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;

void Input(int*,int*);
int Calc(int*,int*);
void Output(int*,int*,int*);

int main(int argc,char* argv[]){
  int n,count=0;
  int arr[100];

  Input(&n,arr);
  count=Calc(&n,arr);

  Output(&n,&count,arr);

  return 0;
}

void Input(int* pn,int *arr){
  
  cin>>*pn;
  for(int i=0;i<*pn;i++){
    cin>>*arr++;
  }
}

int Calc(int* pn,int* arr){
  int count=0;
  
  for(int i=0;i<*pn;i++){
    for(int j=*pn-1;j>i;j--){
      if(arr[j]<arr[j-1]){
	swap(arr[j],arr[j-1]);
	count++;
      }	
    }
  }
  return count;
}

void Output(int* pn,int* pcount,int* arr){

  printf("%d",*arr++);
  for(int i=1;i<*pn;i++)
    printf(" %d",*arr++);
  puts("");

  printf("%d\n",*pcount);
}