You've got two rectangular tables with sizes na × ma and nb × mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then we will define the element of the first table, located at the intersection of the i-th row and the j-th column, as ai, j; we will define the element of the second table, located at the intersection of the i-th row and the j-th column, as bi, j. 

We will call the pair of integers (x, y) a shift of the second table relative to the first one. We'll call the overlap factor of the shift (x, y) value:

<image>

where the variables i, j take only such values, in which the expression ai, j·bi + x, j + y makes sense. More formally, inequalities 1 ≤ i ≤ na, 1 ≤ j ≤ ma, 1 ≤ i + x ≤ nb, 1 ≤ j + y ≤ mb must hold. If there are no values of variables i, j, that satisfy the given inequalities, the value of the sum is considered equal to 0. 

Your task is to find the shift with the maximum overlap factor among all possible shifts.

Input

The first line contains two space-separated integers na, ma (1 ≤ na, ma ≤ 50) — the number of rows and columns in the first table. Then na lines contain ma characters each — the elements of the first table. Each character is either a "0", or a "1".

The next line contains two space-separated integers nb, mb (1 ≤ nb, mb ≤ 50) — the number of rows and columns in the second table. Then follow the elements of the second table in the format, similar to the first table.

It is guaranteed that the first table has at least one number "1". It is guaranteed that the second table has at least one number "1".

Output

Print two space-separated integers x, y (|x|, |y| ≤ 109) — a shift with maximum overlap factor. If there are multiple solutions, print any of them.

Examples

Input

3 2
01
10
00
2 3
001
111


Output

0 1


Input

3 3
000
010
000
1 1
1


Output

-1 -1
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.Locale;

public class ZZZTemplate 
{
	public static void main(String[] args) throws IOException 
	{
		setStandardIO();
		// setFileIO("test");
		
		int na = nextInt();
		int ma = nextInt();
		int taba[][] = new int[na][ma];
		for (int i = 0; i < na; ++i) {
			String s = nextString();
			for (int j = 0; j < ma; ++j)
				taba[i][j] = s.charAt(j) == '0' ? 0 : 1;				
		}			
		
		int nb = nextInt();
		int mb = nextInt();
		int tabb[][] = new int[nb][mb];
		for (int i = 0; i < nb; ++i) {
			String s = nextString();
			for (int j = 0; j < mb; ++j)
				tabb[i][j] = s.charAt(j) == '0' ? 0 : 1;				
		}
		
		int max = -1;
		int maxx = -1;
		int maxy = -1;
		
		for (int x = -52; x <= 52; ++x) {
			for (int y = -52; y <= 52; ++y) {
				int nmax = 0;
				
				for (int i = 0; i < na; ++i) {
					for (int j = 0; j < ma; ++j) {
						int nk = i + x;
						int nl = j + y;
						if (nk >= 0 && nk < nb && nl >= 0 && nl < mb) {
							nmax += taba[i][j] * tabb[nk][nl];
						}
					}						
				}
				
				if (nmax > max) {
					max = nmax;
					maxx = x;
					maxy = y;
				}
			}				
		}
			
		println(maxx + " " + maxy);
		
		flush();
	}

	// ~ -----------------------------------------------------------------------
	// ~ - Auxiliary code ------------------------------------------------------
	// ~ -----------------------------------------------------------------------
	static InputStream in;
	static PrintWriter out;

	/**
	 * Simple buffered reader class. Reads if buffer is empty. Try to fill up
	 * whole buffer.
	 */
	public static class SimpleBufferedInputStream extends InputStream 
	{
		// ~ Static fields / Initializers --------------------------------------
		private static int defaultCharBufferSize = 16384;
		private InputStream in;
		byte[] buffer;
		int pos = 0;
		int len = 0;
		
		// ~ Constructors ------------------------------------------------------
		public SimpleBufferedInputStream(InputStream in) {
			this(in, defaultCharBufferSize);
		}

		public SimpleBufferedInputStream(InputStream in, int size) {
			this.in = in;
			this.buffer = new byte[size];
		}
	    
		// ~ Methods -----------------------------------------------------------
		@Override
		public int read() throws IOException {
			if (pos < len)
				return buffer[pos++];
			
			len = in.read(buffer);
			if (len == -1)
				return len;
			
			pos = 0;
			if (len <= 0)
				return -1;
			
			return buffer[pos++];
		}
	}

	public static void setStandardIO() {
		in = new SimpleBufferedInputStream(System.in);
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	}

	public static void setFileIO(String fileName) throws IOException {
		in = new SimpleBufferedInputStream(new FileInputStream(fileName + ".in"));
 		out = new PrintWriter(new BufferedWriter(new FileWriter(fileName + ".out")));
	}

	public static int skipWhitespaces() throws IOException {
		int c;
		for (;;) {
			c = in.read();
			if (c == -1) throw new IOException();
			if (!isWhitespace(c)) break;
		}	
		
		return c;
	}
	
	public static int skipNewLines() throws IOException {
		int c;
		for (;;) {
			c = in.read();
			if (c == -1) throw new IOException();
			if (!isNewLine(c)) break;
		}	
		
		return c;
	}

	public static boolean isNewLine(int c) {
		return c == '\n' || c == '\r' ? true : false;
	}

	public static boolean isWhitespace(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' ? true : false;
	}
	
	public static int nextNoWhitespace() throws IOException {
		int c = in.read();
		if (c == -1 || isWhitespace(c)) return -1;
		
		return c;
	}

	public static int nextNoNewLine() throws IOException {
		int c = in.read();
		if (c == -1 || isNewLine(c)) return -1;
		
		return c;
	}

	public static long nextLong() throws IOException {
		int c;
		for (;;) {
			c = in.read();
			if (!isWhitespace(c)) break;
			if (c == -1) throw new RuntimeException();
		}	

		boolean neg = false;
		long val = 0;
		if (c == '-')
			neg = true;
		else 
			val = c - '0';
		
		for (;;) {
			c = in.read();
			if (isWhitespace(c) || c == -1) 
				break;
			
			val = val * 10 + (c - '0');
		}

		if (neg) 
			return -val;
		
		return val;
	}

	public static int nextInt() throws IOException {
		int c;
		for (;;) {
			c = in.read();
			if (!isWhitespace(c)) break;
			if (c == -1) throw new RuntimeException();
		}	
		
		boolean neg = false;		
		int val = 0;
		if (c == '-')
			neg = true;
		else 
			val = c - '0';
		
		for (;;) {
			c = in.read();
			if (isWhitespace(c) || c == -1) 
				break;
			
			val = val * 10 + (c - '0');
		}

		if (neg) 
			return -val;
		
		return val;
	}

	public static byte nextByte() throws IOException {
		return (byte) nextInt();
	}

	public static String nextLine() throws IOException {
		int c = (char) skipNewLines();
		
		StringBuilder sb = new StringBuilder();
		sb.append((char) c);
		
		for (;;) {
			c = nextNoNewLine();
			if (c == -1)
				break;
			
			sb.append((char) c);
		}

		return sb.toString();
	}

	public static String nextString() throws IOException {
		int c = (char) skipWhitespaces();
		
		StringBuilder sb = new StringBuilder();
		sb.append((char) c);
		
		for (;;) {
			c = nextNoWhitespace();
			if (c == -1)
				break;
			
			sb.append((char) c);
		}

		return sb.toString();
	}

	public static double nextDouble() throws IOException {
		return Double.parseDouble(nextString());
	}	
	
	public static BigDecimal nextBigDecimal() throws IOException {
		return new BigDecimal(nextString());
	}
	
	public static void flush() {
		out.flush();
	}

	public static void println(Object object) {
		out.println(object);
	}

	public static void print(Object object) {
		out.print(object);
	}

	public static void println(double d, int precision) {
		String s = "%1$." + precision + "f";
		out.format(Locale.ENGLISH, s, d);
		out.println();
	}

	public static void println(BigDecimal d, int precision) {
		String s = "%1$." + precision + "f";
		out.format(Locale.ENGLISH, s, d);
		out.println();
	}
}
