#include<stdio.h>
#define mod 1000000007

char infile[100], outfile[100];

int A[200100];
int main(){
	int w, b, h=1, i, j, c=0, I;
	for(I=1;I<=20;I++){
		h=1;
		c=0;
		scanf("%d %d", &w, &b);
		
		sprintf(infile, ".%d.in", I);
		freopen(infile, "w", stdout);
        printf("%d %d\n", w, b);
        
		while((w+b)>=h*(h+1)/2) h++;
		A[0]=1;
		for(i=1;i<=w;i++) A[i]=0;
		for(i=1;i<h;i++) for(j=w;j>=i;j--) A[j]=(A[j]+A[j-i])%mod;
		for(i=0;i<=w;i++) if(h*(h-1)/2-i<=b) c = (c + A[i])%mod;
		
		sprintf(outfile, ".%d.out", I);
        freopen(outfile, "w", stdout);
        printf("%d\n",c);
	}
}
