#include <iostream>
using namespace std;
int main ()
{int n,i,x,ult,s,copult;
cin>>n>>x;
for (i=2;i<=n;i++)
{s=0;ult=x;copult=ult;cin>>x;
while (copult>0)
{s=s+copult%10;
copult=copult/10;}
if (ult%s==x)
cout<<ult<<" si "<<x<<endl;
}
return 0;
}
ult=x-ul citit anterior
copult=copia x-ului citit anterior
s=suma cifrelor