#include #include using namespace std; const int maxn=1000010; char p[maxn]; int f[maxn]; int main() { #ifdef local freopen("pro.in","r",stdin); #endif int n,kase=0; while(scanf("%d",&n)==1&&n) { scanf("%s",p); for(int i=1;i0&&i%(i-f[i])==0) printf("%d %d\n",i,i/(i-f[i])); printf("\n"); } return 0; }