#include using namespace std; int n,d; int t[101],k[101]; long long dp[101][2]; int main(){ cin>>n>>d; for(int i=0;i>t[i]>>k[i]; } for(int i=0;i