B1 = 97
B2 = 101
DIV = 1000000007

def init(r)
  f = Array.new(r){ Array.new }
  r.times do |i|
    f[i] = gets.chomp.split("").map(&:ord)
  end
  f
end

def calc(f, r, c)
  t1 = 1
  $c.times{ t1 = t1 * B1 % DIV }
  r.times do |i|
    e = 0
    $c.times do |j|
      e = e*B1 + f[i][j]
    end
    (0..c-$c).each do |j|
      $tmp[i][j] = e
      e = (e*B1 - t1*f[i][j] + f[i][j+$c] + DIV) % DIV if j < c - $c
    end
  end

  t2 = 1
  $r.times{ t2 = t2 * B2 % DIV }
  (0..c-$c).each do |j|
    e = 0
    $r.times{ |i| e = e*B2 + $tmp[i][j] }
    (0..r-$r).each do |i|
      $hash[i][j] = e
      e = (e*B2 - t2*$tmp[i][j] + $tmp[i+$r][j] + DIV) % DIV if i < r - $r
    end
  end
end

def check
  $h.times do |i|
    $w.times do |j|
      puts "#{i} #{j}" if $hash[i][j] % DIV == $key % DIV
    end
  end
end

$h, $w = gets.split.map(&:to_i)
$f1 = init($h)
$r, $c = gets.split.map(&:to_i)
$f2 = init($r)
if $h >= $r && $w >= $c
  $hash = Array.new($h){ Array.new($w, 0) }
  $tmp = Array.new($h){ Array.new($w, 0) }
  calc($f2,$r,$c)
  $key = $hash[0][0]
  calc($f1,$h,$w)
  check
end