Go: // 九九を出すだけ
package main
import (
	"fmt"
	"os"
	"bufio"
)
var out = bufio.NewWriter(os.Stdout)

func main(){
	defer out.Flush()
	for i:=1; i<10; i++{
		for j:=1; j<10; j++{
			fmt.Fprintf(out, "%dx%d=%d\n", i, j, i*j)
		}
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define NCLR(a) memset((a), -1 ,sizeof(a))
#define dump(x) cout << #x << " = " << (x) << "\n";
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef priority_queue<int> maxpq;
typedef priority_queue< int, vector<int>, greater<int> > minpq;
typedef complex<double> P;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 1000000007;
static const int INF = 1 << 29;
static const LL LL_INF = 1152921504606846976;
static const int dx[] = { -1, 0, 1, 0, 1, -1, 1, -1 };
static const int dy[] = { 0, -1, 0, 1, 1, 1, -1, -1 };


int main() {
#ifdef _DEBUG
	printf( "debug\n" );
#endif
	for ( int i = 1; i < 10; i++ ) {
		for ( int j = 1; j < 10; j++ ) {
			printf( "%dx%d=%d\n", i, j, i * j );
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;

int main(){

	for(int i=1; i<=9; i++){
		for(int j = 1; j<=9; j++){
			cout << i << "x" << j << "=" << i*j << "\n";
		}
	}

    return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
	int a, b;	//?????°

	for (a = 1; a <= 9; a++){
		for (b = 1; b <= 9; b++){

			cout << a << "x" << b << "=" << a * b << endl;

		}
	}

	return 0;
}

C++: i=1

9.times (
 puts i"*"i"="i*i
 i+=i
)

C++: #include <iostream>
using namespace std;
int main()
{
 while(1)
 {
  int i;
 }
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  for(int i=1;i<=9;++i){
    for(int j=1;j<=9;++j){
      cout<<i<<"x"<<j<<"="<<i*j<<endl;
    }
  }
  return 0;
}

C++: #include <iostream>

int main(void)
{
	for(int i=1; i<10; i++){
		for(int j=1; j<10; j++){
			std::cout << i << 'x' << j << '=' << i*j << std::endl;
		}
	}
	
	return 0;
	
}

C++: // #include <iostream>
#include <stdio.h>
// #include <cmath>

using namespace std;


int main(void){
    
    for(int i = 1; i < 10; i++ ){
        for(int j = 1; j < 10; j++ ){
            printf("%dx%d=%d\n", i, j, i*j);
        }
    }
    return 0;
}

C++: #include <iostream>
using namespace std;

int main(){
    for(int i(1); i<=9; i++){
        for(int j(1); j<=9; j++){
            cout<<i<<"x"<<j<<"="<<i*j<<endl;
        }
    }
    return 0;
}

C++: #include <iostream>
using namespace std;

int main()
{
	for (int i = 1; i <= 9; ++i) {
		for (int j = 1; j <= 9; ++j) {
			cout << i << 'x' << j << '=' << i*j << endl;
		}
	}
}

C++: #include<iostream>
using namespace std;
int main()
{
	int i,j;
	for(i=1;i<10;i++){
		for(j=1;j<10;j++) cout <<i<<"*"<<j<<"="<<i*j<<endl;
	}
	return 0;
}

C++: #include<stdio.h>

int
main()
{
      int i, j;
      
      for(i=1;i<=9;i++)
      {
         for(j=1;j<=9;j++)
         {
            printf("%dx%d =%d\n", i, j, i*j);
         }
      }

return 0;
}

C++: //AOJ 0000
#include<cstdio>
#include<cstdlib>
#include<cstring>
using namespace std;
#define MAX_A 104
#define MAX_B 104

int a,  i, dp[MAX_A][MAX_B], max, j, b, ans, k;

int sort(const void *a, const void *b){
  return *(int*)a - *(int*)b;
}

int main(){
  /*while(1){
    scanf("%d %d", &a, &b);
    if(a == 0 && b == 0) break;
    memset(dp, -1, sizeof(dp));
    for(i = 0; i < a + 2; i++){
      dp[i][0] = 0;
      dp[i][1] = 1;
    }
    for(i = 0; i < b + 2; i++){
      dp[0][i] = 0;
      dp[1][i] = 1;
    }
    dp[1][1] = 1;
    for(i = 2; i <= a; i++){
      for(j = 2; j <= b; j++){
	dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
	if(i > 2 && j > 2) dp[i][j] -= 2;
	else if(i > 2 || j > 2) dp[i][j]--;
	}
    }
    printf("%d\n", dp[a][b] % 100000);
  }
  */
  while(1){
    scanf("%d %d", &a, &b);
    if(a == 0 && b == 0) break;
    if(b < 3 || b > 24){
      printf("0\n");
      continue;
    }
    ans = 0;
    for(i = 0; i <= 7; i++){
      if(b / (i + 1) < 1) break;
      for(j = i + 1; j <= 8; j++){
	if(j >= b - (i + j)) break;
	if(b - (i + j) <= 9) ans++;
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}

C++: #include<stdio.h>
#include<math.h>
#include<algorithm>

int main()
{
	int m, n;
	m = 1;
	n = 1;
	while (m <= 9) {
		while (n <= 9) {
			printf("%dx%d=%d\n", m, n,  m * n);
			n++;
		}
		n = 1;
		m++;
	}
    return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
    int i,j;

    for(i = 1;i <= 9;i++){
        for(j = 1;j <= 9;j++){
            cout << i << 'x' << j << '=' << i * j << endl; 
        }
    }

    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main(){
	for(int i = 1 ; i <= 9 ; i++)
		for(int j = 1 ; j <= 9 ; j++)
			printf("%dx%d=%d\n",i,j,i*j);
}

C++: #include <stdio.h>

int main(void) {
	for (int i = 0; i <= 9; i++) {
		for (int j = 0 j <= 9; j++) {
			printf("%dx%d=%d\n", i, j, i*j);
		}
	}
	return 0;
}

C++: #include<stdio.h>

main() {
	for(int i=1;i<=9;i++)
	for(int j=1;j<=9;j++)
	printf("%dx%d=%d\n",i,j,i*j);
}

C++: #include <iostream>
using namespace std;

int main() {
    for (int i=1; i<=9; i++) {
        for (int j=1; j<=9; j++) {
            printf("%dx%d=%d\n",i,j,i*j);
        }
    }
    return 0;
}

C++: #define _USE_MATH_DEFINES

#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>

using namespace std;

int main()
{
	for (int i = 1; i <= 9; i++)
	{
		for (int j = 1; j <= 9; j++)
		{
			cout << i << "x" << j << "=" << i * j << endl;
		}
	}
}

C++: #include <cstdio>
int s,e;int main(){for(;e%=9,(s+=!e)-10;)printf("%dx%d=%d\n",s,++e,s*e);}

C++: #include <cstdio>

using namespace std;

int main() {
    for (int i = 1; i <= 9; i++) {
        for (int j = 1; j <= 9; j++) {
            printf("%dx%d=%d\n", i, j, i * j);
        }
    }

    return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
  int x,y;
  for(x=1;x<10;x++){
      for(y=1;y<10;y++){
          cout << x << "x" << y << "=" << x*y << endl;
      }
  }
}

C++: #include <iostream>
using namespace std;

int main() {
  int a = 1;
  int b = 1;
  for (a < 10 && b < 9) {
    cout << b << "x" << a << "=" << a*b << endl;
    ++a;
    if (a == 10 && b <= 8) {
    ++b;
    a = 1;
  }
  return 0;
}