Go: package main

import (
	"fmt"
	"strconv"
)

func main() {
	for _, leftValue := range MultiplicationTableNum(9) {
		for _, rightValue := range MultiplicationTableNum(9) {
			strLeftVal, strRightVal, strMulti := strconv.Itoa(leftValue), strconv.Itoa(rightValue), strconv.Itoa(Multiplication(leftValue, rightValue))
			fmt.Println(strLeftVal + "x" + strRightVal + "=" + strMulti)
		}
	}
}

func MultiplicationTableNum(num int) []int {
	multiNum := []int{}
	for i := 1; i <= num; i++ {
		multiNum = append(multiNum, i)
	}
	return multiNum
}

func Multiplication(x, y int) int {
	return x * y
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1e9 + 7/*998244353*/;
const ll INF = 1LL << 60;
ll mod_pow(ll, ll, ll); ll mod_fact(ll, ll); ll mod_inv(ll, ll); ll gcd(ll, ll); ll lcm(ll, ll);
//
int main(){
    for(int i = 1; i <= 9; i++){
        for(int j = 1; j <= 9; j++){
            cout << i << "x" << j << "=" << i*j <<"\n";
        }
    }
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>

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<stdio.h>
int main(void)
{
	int i,j,x;
	for(i=1;i<=9;i++)	{
		for(j=1;j<=9;j++)	{
			x=i*j;
			printf("%dx%d=%d\n",i,j,x);
		}
	}
	return 0;
}

C++: #include<stdio.h>

    int main(){
    
            int x,y,z;
    
            for(x=1;x<=9;x++){
                    
                        for(y=1;y<=9;y++){
                                        
                            z=x*y;
                            printf("%d??%d=%d" " ",x,y,z);

                                        }
                 printf("\n");
                            }
         return 0;
                   }

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

C++: #include<stdio.h>
int main(void){
	int a,b;
	for(a=1;a<10;a++){
		for(b=1;b<10;b++){
			printf("%dx%d=%d\n",a,b,a*b);
		}
	}
	return 0;
}

C++: #include <iostream>
#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>
#include <math.h>
#include <stdio.h>
#include <string>
#include <string.h>
#include <algorithm>

using namespace std;

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

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 <stdio.h>
int main() {
  int i,j;
  for(i=0; i<9; i++)
    for(j=0; j<9; j++)
      printf("%dx%d=%d
",i+1,j+1,(i+1)*(j+1));
  return 0;
}

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

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

C++: #include<stdio.h>
int a, b;int main(){for(a=1;a<=9;a++)for(b=1;b<=9;b++)printf("%dx%d=%d\n",a,b,a*b);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() {
return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
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);
}

C++: # include <iostream>

using namespace std;

int main() {

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

  return 0;
}

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*i, j, i * j );
		}
	}
	return 0;
}

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

int main (){
	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 < 10; i++ ) {
    for ( int j = 1; j < 10; j++ ) {
      cout << i << "x" << j << "=" << i * j << endl;
    }
  }

    return 0;
}

C++: include <iostream>
  
int main(){
    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>
using namespace std;

int main(){
  int i,j;
  for(i=1;i<10;i++)
    for(j=1;j<10;j++)
      cout<<i<<'x'<<j<<'='<<i*j<<'\n';
    return 0;
}

C++: #include<stdio.h>
int a, b;int main(){for(a=1;a<=9;a++)for(b=1;b<=9;b++)printf("%dx%d=%d\n",a,b,a*b);return 0;}

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

C++: #include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>

using namespace std;
const int INF=100005;
const int MAX=505;

int yM[MAX];
char g[MAX][MAX],chk[MAX];
int t;
int SearchPath(int u)
{
    int v;
    for(v=1;v<=t;v++)
    {
        if(g[u][v]&&!chk[v])
        {
            chk[v]=1;
            if(yM[v]==-1||SearchPath(yM[v]))
            {
                yM[v]=u;
                return 1;
            }
        }
    }
    return 0;
}
int MaxMatch()
{
    int u,ret=0;
    memset(yM,-1,sizeof(yM));

    for(u=1;u<=t;u++)
    {
            memset(chk,false,sizeof(chk));
            if(SearchPath(u))
                ret++;

    }
    return ret;
}
int main()
{
    freopen("in.txt","r",stdin);
    int a,b,ans,mark[65];

    while(scanf("%d",&t)!=EOF)
    {
        memset(g,0,sizeof(g));
        for(int i=1;i<=t;i++)
        {
            scanf("%d%d",&a,&b);
            a=a+1;
            b=t-b;
            for(int j=a;j<=b;j++)
                g[i][j]=1;
        }
        ans=MaxMatch();
        printf("%d\n",ans);
    }
    return 0;
}