### classes

class Pt
  attr_accessor :x, :y

  def initialize(x, y)
    @x = x
    @y = y
  end

  def +(pt)
    Pt.new(@x + pt.x, @y + pt.y)
  end

  def -(pt)
    Pt.new(@x - pt.x, @y - pt.y)
  end

  def -@
    Pt.new(-@x, -@y)
  end
  
  def *(t)
    Pt.new(@x * t, @y * t)
  end
  
  def /(t)
    Pt.new(@x / t, @y / t)
  end

  def dot(v)
    @x * v.x + @y * v.y
  end
  
  def cross(v)
    @x * v.y - @y * v.x
  end

  def to_s
    "(#{@x},#{@y})"
  end
end

### subroutines

def cross_lines(a0, a1, b0, b1)
  da = a1 - a0
  db = b1 - b0

  op01 = da.cross(db)
  return nil if op01 == 0.0

  v = b0 - a0
  op0 = v.cross(da)
  op1 = v.cross(db)

  t0 = op1 / op01
  t1 = op0 / op01

  [db * t1 + b0, t0, t1]
end

def cross_segs?(a0, a1, b0, b1)
  cl = cross_lines(a0, a1, b0, b1)
  return false if cl.nil?

  pt, t0, t1 = cl
  t0 > 0.0 && t0 < 1.0 && t1 > 0.0 && t1 < 1.0
end

def cross_segs_extended(a0, a1, b0, b1)
  cl = cross_lines(a0, a1, b0, b1)
  return nil if cl.nil?

  pt, t0, t1 = cl
  return nil if t0 <= 1.0 || t1 <= 0.0 || t1 >= 1.0

  [pt, t1]
end

def make_convex(pts)
  changed = true

  while pts.length > 3 && changed
    changed = false

    n = pts.length
    for i in (0...n)
      pt = pts[i]
      pt0 = pts[(i + n - 1) % n]
      pt1 = pts[(i + 1) % n]

      v0 = pt - pt0
      v1 = pt - pt1
      #p [v0.x, v0.y, v1.x, v1.y, v0.cross(v1)]
      next if v0.cross(v1) < 0

      i0 = i1 = nil
      ti0 = ti1 = nil
      ptc0 = ptc1 = nil
      
      for k in (2...(n - 2))
        ei0 = (i + k) % n
        ei1 = (ei0 + 1) % n
        ept0 = pts[ei0]
        ept1 = pts[ei1]
        
        if i0.nil?
          cs = cross_segs_extended(pt0, pt, ept0, ept1)
          if ! cs.nil?
            ptc0, ti0 = cs
            i0 = ei0
          end
        end

        if i1.nil?
          cs = cross_segs_extended(pt1, pt, ept0, ept1)
          if ! cs.nil?
            ptc1, ti1 = cs
            i1 = ei0
          end
        end

        break if i0 && i1
      end

      #p [i, i - 1, i0, ti0, ptc0.x, ptc0.y]
      #p [i, i + 1, i1, ti1, ptc1.x, ptc1.y]
      #exit

      pts0 = [pt, ptc0]
      j = i0
      while j != i1
        j = (j + 1) % n
        pts0 << pts[j]
      end
      pts0 << ptc1

      pts = pts0
      changed = true
      break
    end
  end

  pts
end

### main

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

  pts = n.times.map{Pt.new(*gets.split.map(&:to_f))}
  #p pts

  ptsc = make_convex(pts.clone)
  #p ptsc.map{|pt| pt.to_s}

  c = ptsc.inject(:+) / ptsc.length
  #p c.to_s

  star = true
  for i in (0...n)
    pt = pts[i]
    for j in (1...(n - 1))
      i0 = (i + j) % n
      i1 = (i0 + 1) % n

      if cross_segs?(c, pt, pts[i0], pts[i1])
        star = false
        break
      end
    end
    break if ! star
  end

  puts (star ? 1 : 0)
end