// // main.cpp // abc // // Created by Alex Rancea on 11/02/15. // Copyright (c) 2015 Alex Rancea. All rights reserved. // #include #include using namespace std; int main() { int n,m,wi,bi,sw=0,sb=0; cin>>n>>m; for(int i=1;i<=n;i++){ cin>>wi>>bi; if(wi>bi){ sw += wi; } else{ sb +=bi; } } cout<