### classes

class BIT
  def initialize(n)
    @n = n
    @bits = (n + 1).times.map{0}
  end

  def sum(x)
    s = 0
    while x > 0
      s += @bits[x]
      x -= (x & -x)
    end
    s
  end

  def add(x, v)
    while x <= @n
      @bits[x] += v
      x += (x & -x)
    end
  end
end

class BIT2D
  def initialize(h, w)
    @h = h
    @bits = (h + 1).times.map{BIT.new(w)}
  end

  def sum(y, x)
    return 0 if y == 0 || x == 0
    s = 0
    while y > 0
      s += @bits[y].sum(x)
      y -= (y & -y)
    end
    s
  end

  def add(y, x, v)
    while y <= @h
      @bits[y].add(x, v)
      y += (y & -y)
    end
  end
end

### main

loop do
  n = gets.to_i
  break if n == 0

  w, h = gets.split.map(&:to_i)

  bit2 = BIT2D.new(h, w)

  n.times do
    xi, yi = gets.split.map(&:to_i)
    bit2.add(yi, xi, 1)
  end

  sw, th = gets.split.map(&:to_i)

  max_pn = 0

  for y in (th..h)
    y0 = y - th
    for x in (sw..w)
      x0 = x - sw
      pn = bit2.sum(y, x) - bit2.sum(y0, x) - bit2.sum(y, x0) + bit2.sum(y0, x0)
      max_pn = pn if max_pn < pn
    end
  end

  puts max_pn
end