#include #include using namespace std; struct player { int atk=0; int def=0; long long add=0; }; int main() { player a[150]; long long s[150]; int n; cin>>n; for(int i=0;i>a[i].atk>>a[i].def; a[i].add=a[i].atk*a[i].atk+a[i].def*a[i].def; s[i]=a[i].add; } sort(s+0,s+n); for(int i=0;i