#include<stdio.h>
void main()
{
double sum = 0.0; ;
int people;
int i,j,n;
int last = 0;
for(people = 20; people>1; people --)
for(i = 1; i < people; i ++)
for(j = 1; j < people-i; j ++)
for(n = 1; n < people-i-j; n ++)
{
sum = 1.0 / people+ 1.0 / (people- i) + 1.0 / (people - i - j) + 1.0 / (people- i - j - n);
if(sum == 1.0)
printf("%d %d %d %d 0\n", people, people-i, people-i-j, people-i-j-n);
}
}