import scala.io.StdIn._

import Math._
object Main extends App {
  val eps0 = 1e-12

  val q = readLine.toInt

  val xs = new Array[Int](q+2)
  val ys = new Array[Int](q+2)
  for (i <- 0 until q) {
    val Seq(x, y) = readLine.split(' ').map(_.toInt).toList
    xs(i) = x
    ys(i) = y
  }

  xs(q) = xs(0); xs(q+1) = xs(1)
  ys(q) = ys(0); ys(q+1) = ys(1)

  val subarea = for (i <- 0 until q) yield {
    val xs1 = xs(i+1) - xs(i)
    val ys1 = ys(i+1) - ys(i)
    val xs2 = xs(i+2) - xs(i)
    val ys2 = ys(i+2) - ys(i)

    xs1 * ys2 - ys1 * xs2
  }

  println(if (subarea.forall(_ >= 0)) "1" else "0")
}
