#include <iostream>
using namespace std;
int main()
{
long x = 0,y =0;
while(cin>>x>>y){
if(x>y){
cout <<x-y<<endl;
}else{
cout <<y-x<<endl;
}
}
return 0;
}
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=996