import java.util.*;

import ru.ifmo.testlib.*;
import ru.ifmo.testlib.Outcome.Type;

public class Check implements Checker {
	public Outcome test(InStream inf, InStream ouf, InStream ans) {
		int n1 = ouf.nextInt();
		int n2 = ans.nextInt();
		if (n1 != n2) {
			return new Outcome(Type.WA, "Size different");
		}
		int[] a = new int[n1];
		int[] b = new int[n1];
		for (int i = 0; i < n1; i++) {
			a[i] = ouf.nextInt();
			b[i] = ans.nextInt();
		}
		Arrays.sort(a);
		Arrays.sort(b);
		for (int i = 0; i < n1; i++) {
			if (a[i] != b[i]) {
				return new Outcome(Type.WA, "Bad town");
			}
		}
		return new Outcome(Type.OK, "");
	}
}