n = gets.to_i
p = []
n.times{|i|
  p[i] = gets.split.map(&:to_f)
}
p << p[0]
p << p[1]

n.times{|i|
  a = [p[i+1][0]-p[i][0], p[i+1][1]-p[i][1]]
  b = [p[i+2][0]-p[i][0], p[i+2][1]-p[i][1]]
  if a[0]*b[1]-a[1]*b[0] < 0
    puts 0
    exit
  end
}
puts 1