N = gets.chomp.to_i
P = Array.new(N)

i = 0
while l = gets do
  P[i] = l.chomp.split(' ').map(&:to_i)
  i += 1
end

def f(t)
  max_x = - 10 ** 9 - 1
  min_x = 10 ** 9 + 1
  max_y = - 10 ** 9 - 1
  min_y = 10 ** 9 + 1
  t.each do |i|
    max_x = i[0] if i[0] > max_x
    min_x = i[0] if i[0] < min_x
    max_y = i[1] if i[1] > max_y
    min_y = i[1] if i[1] < min_y
  end
  # print "max_x: #{max_x}, min_x: #{min_x}, max_y: #{max_y}, min_y: #{min_y}"
  # puts ''

  ret = 0
  P.each do |k|
    if k[0].between?(min_x, max_x) && k[1].between?(min_y, max_y)
      ret += 1
    end
  end

  return ret
end

ans = 0
(1..N).each do |item|
  P.combination(item).each do |item2|
    ans += f(item2)
  end
end

puts ans % 998244353
