#include <iostream>
#include <algorithm>
using namespace std;
struct st
{
int a,b;
};
bool cmp(st x,st y)
{
if (x.a>y.a) return 1;
else return 0;
}
int main()
{
st s[10];int i;
for (i=0;i<10;i++)
{
s[i].a=rand()%1000;
s[i].b=rand()%1000;
}
sort(s,s+10,cmp);
for (i=0;i<10;i++)
cout<<s[i].a<<' '<<s[i].b<<endl;
//system("pause");
}