//AC
#include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <queue>
#include <stack>
#include <vector>
#include <map>
#include <set>
typedef long long ll;
using namespace std;
int main(){
int a,b,i,sum;
cin>>a>>b;
i=a;
sum=0;
while(i<=b) {
for (int j=1; j<=5; j++) {
sum=sum+i;
printf("%5d",i);
i++;
if(i>b){break;}
}
cout<<endl;;
}
cout<<"Sum = ";
cout<<sum<<endl;
return 0;
}