DList = Struct.new :v, :p, :n

class DList
  def delete
    p.n = n
    n.p = p
  end

  def push x
    l = self.class.new x, self.p, self
    p.n = l
    self.p = l
  end
end

ps = gets.to_i.times.map { Complex(*gets.split.map(&:to_i)) }
p0 = ps.min_by {|z| z.rect.reverse! }
ps.map! {|p| p - p0 }.sort! {|u, v|
  d, c = (u.conj * v).rect
  c > 0 || c == 0 && (u.conj * u).real >= d ? -1 : 1
}
l = DList.new
l.p = l.n = l
ps.each {|p| l.push p }
l = l.delete.n.n
until l.v.zero?
  u, v = l.v - l.p.v, l.n.v - l.p.v
  if (u.conj * v).imag >= 0
    l = l.n
  else
    l = l.delete
  end
end
rs = [p0]
l = l.n
until l.v.zero?
  rs << l.v + p0
  l = l.n
end
p rs.size
rs.each {|z| puts z.rect.map(&:to_i).join ' ' }