#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fo(i,n) for(int i=0;i<n;i++)
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define tr(it,a) for(auto it=a.begin();it!=a.end();it++)
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<pair<int, int>> vpii;
#define FASTIO ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
int main() {
	FASTIO

	int t = 1;
//	cin >> t;
	while (t--) {
		int n;
		cin >> n;
		vpii v(n);
		fo(i, n) {
			cin>>v[i].F;
            cin>>v[i].S;
		}
		int ans = 0;
		fo(i, n) {
			int x1 = v[i].F;
			int y1 = v[i].S;
          //  cout<<x1<<" "<<y1<<"points"<<endl;
			for (int j = i + 1; j < n; j++) {
				int delx=v[j].F-x1;
				int dely=v[j].S-y1;
            //    cout<<delx<<" "<<dely<<endl;
				if ( abs(dely)<=abs(delx) ) {
					ans++;
				}
            }
		}
		cout << ans << endl;
	}

	return 0;
}

/*Allah Vorosha*/
#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define ull unsigned long long
#define pb push_back
#define n_p next_permutation
#define p_p prev_permutation
#define in insert
#define rev reverse
#define pf push_front
#define pob pop_back
#define uniq(v)         v.resize(distance(v.begin(),unique(v.begin(),v.end())))
#define all(x) (x).begin(),(x).end()
#define pof pop_front
#define ios ios_base::sync_with_stdio(0);cin.tie();cout.tie();
#define scn scanf
#define prt printf
#define rep(i, a, n) for(int i = a; i < n; i++)
#define mod 720720
#define yes cout << "Yes\n"
#define no cout << "No\n";
#define take for(auto &it : a) cin >> it;
#define out cout << a << "\n";
#define l_b lower_bound
#define u_b upper_bound
#define Max 100005

using namespace std;

const int N = 10005;

void solve() {
    ll n, m;
    cin >> n >> m;
    for(ll i = 1; i * i <= m; ++i) {
        if(m % i == 0) {
            ll k = m / i;
            if(i + k == n) {
                yes;
                return;
            }
        }
    }
    no;
}

int main() {

    solve();
    return 0;
}
