include Math

n = gets.to_i
points = (1..n).map { gets.split.map(&:to_i) }

if (2..n-1).all? {|i|
  (points[1][1] - points[0][1]) * (points[i][0] - points[0][0]) ==
  (points[i][1] - points[0][1]) * (points[1][0] - points[0][0])
}
  puts 'No'
  exit
end

center = [points.map(&:first).inject(:+) / n.to_f, points.map(&:last).inject(:+) / n.to_f]
points.map! {|x, y| [x - center[0], y - center[1]] }
points.reject! {|x, y| x.abs + y.abs < 1e-5 }
points.sort_by! {|x, y| atan2(y, x) }

a = []
points.each {|point| a << point }
points.each_cons(2) {|p1, p2| a << [(p1[0] + p2[0]) / 2.0, (p1[1] + p2[1]) / 2.0] }
a << [(points[-1][0] + points[0][0]) / 2.0, (points[-1][1] + points[0][1]) / 2.0]

ret = false
a.each do |x0, y0|
  t = atan2(y0, x0)

  rotated = points.map {|x, y| [cos(-t) * x - sin(-t) * y, sin(-t) * x + cos(-t) * y] }
  rotated.map! {|x, y| [x.round(5), y.round(5)] }
  rotated.reject! {|_, y| y.abs < 1e-5 }
  next if rotated.size < n - 2
  upper_points, lower_points = rotated.partition {|_, y| y > 0 }
  next if upper_points.empty? || lower_points.empty?
  next if upper_points.size != lower_points.size
  turned_lower_points = lower_points.map {|x, y| [x, -y] }
  upper_points.sort!
  turned_lower_points.sort!
  if upper_points.zip(turned_lower_points).all? {|p1, p2| (p1[0] - p2[0]).abs + (p1[1] - p2[1]).abs < 1e-5 }
    ret = true
    break
  end
end
puts ret ? 'Yes' : 'No'

