func_code_string: #include <bits/stdc++.h>   using namespace std;   template <typename G>   struct triple {     G first, second, T;   };   struct BIT {     vector<int> v;     BIT(int n) : v(n + 10) {}     void upd(int p) {       for (; p < v.size(); p += (p & (-p))) ++v[p];     }     int query(int p) {       int x = 0;       for (; p > 0; p -= (p & (-p))) x += v[p];       return x;     }   };   struct fraction {     long long x, y;     bool operator<(fraction o) { return x * o.y < y * o.x; }     bool operator>(fraction o) { return x * o.y > y * o.x; }     bool operator!=(fraction o) { return x * o.y != y * o.x; }   };   struct info {     fraction f1, f2;     int ind;     info(long long x, long long v, long long _ind, long long w) : ind(_ind) {       f1 = {abs(x), abs(v - w)};       f2 = {abs(x), abs(v + w)};     }   };   bool cmp1(info x, info y) {     if (x.f1 != y.f1) return x.f1 < y.f1;     if (x.f2 != y.f2) return x.f2 > y.f2;     return x.ind < y.ind;   }   bool cmp2(info x, info y) {     if (x.f2 != y.f2) return x.f2 < y.f2;     if (x.f1 != y.f1) return x.f1 > y.f1;     return x.ind > y.ind;   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     int n, w;     cin >> n >> w;     vector<info> a;     for (int i = 0; i < n; i++) {       int x, v;       cin >> x >> v;       a.push_back({x, v, i, w});     }     vector<int> t1(n), t2(n);     sort(a.begin(), a.end(), cmp1);     for (int i = 0; i < n; i++) t1[i] = a[i].ind;     sort(a.begin(), a.end(), cmp2);     for (int i = 0; i < n; i++) t2[i] = a[i].ind;     vector<int> p(n);     for (int i = 0; i < n; i++) p[t1[i]] = i + 1;     long long ans = 0;     BIT abi(n);     for (int i = 0; i < n; i++) {       ans += i - abi.query(p[t2[i]]);       abi.upd(p[t2[i]]);     }     cout << ans <<   n ;     return 0;   }   