#include<cstdio>
#include<cstring>
using namespace std;
int sr[4], d, ss, m=0, n=0, i, j, w, vv=0, head=0,tail=1, s[1000][5]={0}, qq[2000]={0};
bool pd(int j, int d)
{
if(s[j][1]==d||s[j][2]==d||s[j][3]==d) return 1;
else return 0;
}
int jc(int j)
{
int m;
for(m=0;m<j;m++)
{
if(s[m][1]==s[j][1]&&s[m][2]==s[j][2]&&s[m][3]==s[j][3]) return 1;
}
return 0;
}
int outp(int k)
{
int i=0, w[2000], dd=k;
printf("%d\n", s[k][4]);
while(k!=0)
{
w[i++]=qq[k];
k=qq[k];
}
for(i=i-1;i>=0;i--)
{
printf("%d %d %d\n", s[w[i]][1], s[w[i]][2], s[w[i]][3]);
}
printf("%d %d %d\n", s[dd][1], s[dd][2], s[dd][3]);
return 0;
}
int main()
{
scanf("%d %d %d %d", &sr[1], &sr[2], &sr[3], &d);
s[0][1]=sr[1];
s[0][4]=1;
vv=tail;
if(d>sr[1])
{
printf("No find\n");
return 0;
}
if(d==sr[1])
{
printf("%d 0 0\n0", sr[1]);
return 0;
}
int count=0;
while(count<1000)
{
tail=vv;
for(ss=head;ss<tail;ss++)
{
for(i=1;i<=3;i++)
{
if(s[ss][i]!=sr[i])
{
for(j=1;j<=3;j++)
{
if(i!=j&&s[ss][j]!=0)
{
s[vv][1]=s[ss][1];
s[vv][2]=s[ss][2];
s[vv][3]=s[ss][3];
s[vv][4]=s[ss][4]+1;
if(s[ss][j]>sr[i]-s[ss][i])
{
s[vv][j]=s[ss][j]-sr[i]+s[ss][i];
s[vv][i]=sr[i];
}
else {
s[vv][j]=0;
s[vv][i]=s[ss][i]+s[ss][j];
}
qq[vv]=ss;
if(pd(vv, d)==1)
{
outp(vv);
return 0;
}
if(jc(vv)==0) vv++;
else memset(s[vv],0,sizeof(s[vv]));
}
}
}
}
}
head=tail;
count++;
}
return 0;
}