if(stabilitycheck(n,mpairs,wpairs,mpref,wpref,
mpriority,wpriority))
printf("The pairings are stable \n");
else
printf("The pairings are not stable \n");
printf("The pairings are: \n");
printf("man wife \n");
for(i=1;i<=n;i++)
printf("%d %d \n",i,mate(i,mpairs));
}