#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define ss second
#define ff first
#define pb push_back
#define mp make_pair
ll n,k;
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cin>>n>>k;
ll ans=0;
for(int i=0;i<n;i++){
ll x,y;
cin>>x>>y;
ll o=k/x;
if(o<x)continue;
x=x*x;
ans+=(k/x)*y;
}
cout<<ans;
}
/*
5 3
1 3 3 2 4 6
-1 -5 -10 4 -3 5
1 3 2
*/