#pragma GCC optimize("O3") #include #include using namespace std; typedef long long ll; const int INF = 1<<30; const ll INFLL = 1LL<<60; const ll MOD = 998244353; const double INFD = 1.0E10; const int dx[4] = {1, 0, -1, 0}; const int dy[4] = {0, -1, 0, 1}; //const int dx[8] = {1, 1, 0, -1, -1, -1, 0, 1}; //const int dy[8] = {0, 1, 1, 1, 0, -1, -1, -1}; using Pair = pair; using Graph = vector >; using mint = atcoder::modint998244353; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(15); int n; cin >> n; vector x(n), y(n); for (int i = 0; i < n; i++) cin >> x[i] >> y[i]; int idx = 0, val = INF; for (int i = 0; i < n; i++){ if (x[i] < val){ idx = i; val = x[i]; } } //cerr << idx << " " << x[idx] << " " << y[idx] << endl; vector> xy; for (int i = 0; i < n; i++){ if (i != idx) xy.emplace_back(x[i] - x[idx], y[i] - y[idx]); } sort(xy.begin(), xy.end(), [](const auto &p1, const auto &p2){ return atan2l(p1.second, p1.first) < atan2l(p2.second, p2.first); }); mint ans = 0; for (int i = 0; i < n - 2; i++){ auto [x1, y1] = xy[i]; auto [x2, y2] = xy[i + 1]; //cerr << x1 << y1 << x2 << y2 << " " << abs(x1 * y2 - x2 * y1) * mint(2).inv().val() << endl;; ans += mint(2).inv() * abs(x1 * y2 - x2 * y1); } cout << ans.val() << endl; return 0; }