B1 = 101
B2 = 97
DIV = 1<<32

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 *= B1 }
  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  if j < c - $c
    end
  end

  t2 = 1
  $r.times{ t2 *= B2 }
  (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 if i < r - $r
    end
  end
end

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

h, w = gets.split.map(&:to_i)
f1 = init(h)
$r, $c = gets.split.map(&:to_i)
f2 = init($r)
$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(h,w)