C Quick Refresher

Nested for statement
What is the output of the following program?
int main()
{
int i, j;
int sum=0;
for(i=1; i<=5000; i++)
{
for(j=i+1; j<=i*2; j++)
{
sum = sum + j;
if(sum>10)
break;
}
if(sum>10) break;
}
printf("%d %d", i, sum);
}

No Comments..!