//读题不仔细,以为是20个人呢,唉 
#include <iostream>

using namespace std;


int main()
{
    int a,b,c,d;
    for(int a= 1;a < 20;a++)
      for(int b = 1; b < 20; b++)
        for(int c = 1; c < 20; c++)
          for(int d =1; d < 20; d++)
          {
                  double x = 1.0/(a+b+c+d)+1.0/(b+c+d)+1.0/(c+d)+1.0/d;
                  if(x+1e-6>=1.0&&x-1e-6<=1.0&&(a+b+c+d<=20))
                    cout << a+b+c+d <<',' << b+c+d<<','<<c+d<<','<<d << ','<< 0<< endl;
                    }                    
                    system("pause"); 
          return 0;
 }