jiahuimbzuai/CoQuIR huggingface dataset:
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const [X, t] = input[0].map(Number);

  return Math.max(0, X - t);
};

console.log(main(read()));
//  [typescript]
import * as fs from 'fs';

namespace AtCoder.abc072 {

    const args: string[] = fs.readFileSync('/dev/stdin', 'utf8').trim().split('\n');
    const [x, t]: number[] = args[0].split(' ').map(Number);

    if (x >= t) {
        console.log(x - t);
    } else {
        console.log(0);
    }
}
//  [typescript]
"use strict";
new Promise(resolve => {
  resolve(require("fs").readFileSync("/dev/stdin", "utf8").split(/\s/));
}).then(input => {
  const [X, t] = input.map(x => Number(x));
  const ans = X >= t ? X - t : 0;
  console.log(ans);
});
//  [python]
import numpy as np

N,A,B=[int(i) for i in input().split()]
x=min(A,B)
if((A+B)>N):
    z=N
    y=abs(A+B-z)
else:
    y=0
print("{} {}".format(x,y))
//  [python]
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 27 20:42:18 2019

@author: Owner
"""


import collections
import scipy.misc
import sys
import numpy as np
import math
from operator import itemgetter
import itertools
import copy

#素因数を並べる
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   
# 桁数を吐く
def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    # リスト要素と対象値の差分を計算し最小値のインデックスを取得
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

"""
N, X = map(int, input().split())

x = [0]*N
x[:] = map(int, input().split())

P = [0]*M
Y = [0]*M
for m in range(M):
    P[m], Y[m] = map(int, input().split())
    
all(nstr.count(c) for c in '753')
"""

N, A, B = map(int, input().split())

result = []

result.append(min(A, B))
if (A+B) < N:
    result.append(0)
else:
    result.append(A+B - N)
print(result[0],result[1])
//  [python]
#!/Users/takahiro.kida/git/atcorder/venv/bin/python

import numpy as np
import scipy

from collections import defaultdict
from pprint import pprint

N, A, B = [int(x) for x in input().split(" ")]

ans1 = min(A,B)
if A+B <= N:
    ans2 = 0
else:
    ans2 = A + B - N
print("{} {}".format(ans1,ans2))
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

    public static void main(String args[]) throws IOException {

        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            br.lines()
                    .map(line -> Arrays.stream(line.split(" "))
                            .mapToInt(Integer::parseInt)
                            .toArray())
                    .forEach(inputs -> {
                        int n = Integer.valueOf(inputs[0]);
                        int a = Integer.valueOf(inputs[1]);
                        int b = Integer.valueOf(inputs[2]);

                        output(Math.min(a,b) + " " + (a + b > n ? a + b - n: 0));
                    });
        }

    }

    private static void output(String message){
        System.out.println(message);
    }
}
//  [java]
import java.io.PrintWriter;
import java.util.*;
import java.util.stream.Collectors;

public class Main {
	public static String implementation(List<String> array){
		List<Integer> list = Arrays.stream(array.get(0).split(" ")).map(s -> {
			return Integer.parseInt(s);
		}).collect(Collectors.toList());

		return Math.min(list.get(1), list.get(2)) + " " + Math.max(0, (list.get(1) + list.get(2) - list.get(0)));
	}

	public static void main(String[] args){
		// Input
		Scanner sc = new Scanner(System.in);

		// Read input and execute method
		String tmp;
		List<String> array = new ArrayList<String>();
		while(true) {
			try {
				tmp = sc.nextLine();
				if (tmp.length() == 0) {
					exec(array);
					array.clear();
				} else {
					array.add(tmp);
				}
			} catch (Exception e){
				exec(array);
				break;
			}
		}
	}

	public static void exec(List<String> array){
		// Output variable
		String out = implementation(array);

		// Output
		PrintWriter stdOut = new PrintWriter(System.out);
		stdOut.println(out);
		stdOut.flush();

		// Debug
		if(array.get(array.size()-1).startsWith("a:")) {
			if (!array.get(array.size() - 1).substring(2).equals(out)) {
				System.out.println("error included");
				System.out.println("output : " + out);
				System.out.println("expected : " + array.get(array.size()-1).substring(2));
			} else {
				System.out.println("correct answer!!");
			}
			System.out.println("");
		}
	}
}
//  [java]

import java.util.Scanner;

public class Main {

	static Scanner scanner;
	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

	    int n=gi();
	    int a=gi();
	    int b=gi();
	    
	    System.out.print(Math.min(a, b) +" "+Math.max(a+b-n,0));
//	    if (m1==m2) {
//	    	System.out.print("0");
//	    }else {
//	    	System.out.print("1");
//	    }



	}

	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
}
//  [cpp]
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main(){
    int n,a,b; cin >> n >> a >> b;
    cout << min(a,b) << " " << (n >= a+b ? 0 : a+b-n) << endl;
    return 0;
}
//  [cpp]
#include <iostream>
#include <cassert>
#include <climits>
#include <bitset>
#include <stack>
#include <queue>
#include <iomanip>
#include <limits>
#include <string>
#include <cmath>
#include <set>
#include <map>
#include <math.h>
#include <algorithm>
#include <vector>
#include <string.h>
#include <tuple>

using namespace std;

typedef long long ll;
typedef pair<ll,ll> P;

long long int INF = 1e18;
long long int mod = 1000000007;
double Pi = 3.1415926535897932384626;

vector<ll> G[500005];
vector<P> tree[500010];
priority_queue <ll> pql;
priority_queue <P> pqp;
//big priority queue
priority_queue <ll,vector<ll>,greater<ll> > pqls;
priority_queue <P,vector<P>,greater<P> > pqps;
//small priority queue
//top pop

int dx[8]={1,0,-1,0,1,1,-1,-1};
int dy[8]={0,1,0,-1,1,-1,-1,1};
char dir[] = "RULD";
//↓,→,↑,←

#define p(x) cout<<x<<endl;
#define el cout<<endl;
#define pe(x) cout<<x<<" ";
#define ps(x) cout<<fixed<<setprecision(25)<<x<<endl;
#define pu(x) cout<<x;
#define re(i,n) for(i=0;i<n;i++);
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define deba(x) cout<< #x << " = " << x <<endl

ll rui(ll number1,ll number2){
    if(number2 == 0){
        return 1;
    }else{
        ll number3 = rui(number1,number2 / 2);
        number3 *= number3;
        number3 %= mod;
        if(number2%2==1){
            number3 *= number1;
            number3 %= mod;
        }
        return number3;
    }
}
ll gcd(ll number1,ll number2){
    if(number1 > number2){
        swap(number1 , number2);
    }
    if(number1 == 0 || number1 == number2){
        return number2;
    }else{
        return gcd(number2 % number1 , number1);
    }
}

ll i,j,k,ii,jj,n,m,a,b,c,d,e,f,g,h,r,w,l;
ll num,ans,sum,ok,ng;
ll x[500005],y[500005],z[500005];
char s[500005];
bool dame,flag;

int main(){
	cin >> n >> a >> b;
	pe(min(a,b));
	p(max(0ll,a+b-n));
	return 0;
}
//  [c]
#include <stdio.h>

int main(){
  int N,A,B;
  int min,max;
  scanf("%d %d %d",&N,&A,&B);
  
  if(A<B) max=A;
  else max=B;
  
  min=A+B-N;
  if(min<0) min=0;
  
  printf("%d %d\n",max,min);
  return 0;
}
//  [c]
#include <stdio.h>

int main(){
  int N,A,B;
  int ans_1,ans_2;
  scanf("%d %d %d",&N,&A,&B);
  if(A<B)ans_1=A;
  else ans_1=B;
  if(A+B>N)ans_2=A+B-N;
  else ans_2=0;
  printf("%d %d\n",ans_1,ans_2);
}
//  [c]
#include <stdio.h>

int main(void) {
	int N, A, B;
	int asumi, iguti;
	if (scanf("%d%d%d", &N, &A, &B) != 3) return 1;
	asumi = (A + B) - N;
	iguti = A <= B ? A : B;
	printf("%d %d\n", iguti, asumi < 0 ? 0 : asumi);
	return 0;
}
//  [javascript]
lines = [];
readline = require("readline");

rl = readline.createInterface({
  input: process.stdin,
  output:process.stdout
});

rl.on('line',function(x){
  lines.push(x);
})

rl.on('close',function(){
  var n = Number(lines[0].split(" ")[0]);
  var a = Number(lines[0].split(" ")[1]);
  var b = Number(lines[0].split(" ")[2]);

  var max = (a < b)? a : b;
  var min = (n < (a+b))? a+b-n : 0;

  console.log(max,min);

})
//  [javascript]
'use strict'

const main = (INPUT) => {
  const input = INPUT.split('\n')[0].split(' ').map(n => Number(n))
  const N = input[0]
  const A = input[1]
  const B = input[2]

  const max = A < B ? A : B
  const min = (A + B) - N < 0 ? 0 : (A + B) - N

  console.log(max, min)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [javascript]
function main(input) {
    const args = input.split(' ');
    const N = parseInt(args[0], 10);
    const A = parseInt(args[1], 10);
    const B = parseInt(args[2], 10);
  var max,min
  
	if(A+B-N>0){
      min = A+B-N
    }else{
      min = 0
    }
  if(A>B){
    max = B
  }else{
    max = A
  }
  
  console.log(max + " " + min)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	N, A, B := ReadInt(), ReadInt(), ReadInt()
	fmt.Println(Min(A, B), Max(A+B-N, 0))
}

func Max(xs ...int) int {
	max := xs[0]
	for _, x := range xs[1:] {
		if max < x {
			max = x
		}
	}
	return max
}

func Min(xs ...int) int {
	min := xs[0]
	for _, x := range xs[1:] {
		if min > x {
			min = x
		}
	}
	return min
}

var reader = bufio.NewReader(os.Stdin)

func Scan(a ...interface{}) {
	if _, err := fmt.Fscan(reader, a...); err != nil {
		panic(err)
	}
}
func ReadInt() (i int)       { Scan(&i); return }
func ReadString() (s string) { Scan(&s); return }
func ReadInts(n int) []int {
	v := make([]int, n)
	for i := 0; i < n; i++ {
		Scan(&v[i])
	}
	return v
}
//  [ruby]
class Problem
  attr_accessor *(?a..?z).to_a.map(&:to_sym)
  def initialize
    @n,@a,@b = gets.split.map(&:to_i)
  end

  def solve
    [maxi, mini].join(" ")
  end

  def maxi
    [a,b].min
  end

  def mini
    [a + b - n, 0].max
  end

  def show(ans)
    puts ans
  end
end

Problem.new.instance_eval do
  show(solve)
end
//  [ruby]
n, a, b = gets.split.map(&:to_i)
max = [a, b].min
min = [(a + b) - n, 0].max
puts "#{max} #{min}"
//  [ruby]
n, a, b = gets.chomp.split.map(&:to_i)
puts [[a, b].min, [(a+b)-n, 0].max].join(" ")
//  [rust]
use std::io::{stdin, Read, StdinLock};
use std::str::FromStr;

// reference: http://ir5.hatenablog.com/entry/20171209/1512821837

struct Scanner<'a> {
    cin: StdinLock<'a>,
}
 
impl<'a> Scanner<'a> {
    fn new(cin: StdinLock<'a>) -> Scanner<'a> {
        Scanner { cin: cin }
    }
 
    fn read1<T: FromStr>(&mut self) -> Option<T> {
        let token = self.cin.by_ref().bytes().map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect::<String>();
        token.parse::<T>().ok()
    }
 
    fn read<T: FromStr>(&mut self) -> T {
        self.read1().unwrap()
    }
}

use std::mem;
use std::cmp;

fn main() {
    let cin = stdin();
    let cin = cin.lock();
    let mut sc = Scanner::new(cin);

    let n: i32 = sc.read();
    let a: i32 = sc.read();
    let b: i32 = sc.read();
    println!("{} {}", cmp::min(a, b), cmp::max(a + b - n, 0));
}
//  [typescript]
"use strict";
const Main = (input) =>{
   let xs = input.trim().split(' ').map(v=>parseInt(v,10)); 
   let N = xs[0], A = xs[1], B = xs[2];
   let max = 0;
   let min = 0;
   if(A<B){
     max = A;
     if(N>A+B){
       min = 0;
     }else if(N==A&&N==B){
       min = A;
     }else{
       min = (A + B) - N;
     }
    console.log(max + ' ' +min);  
   }else{
     max = B;
     if(N>A+B){
       min = 0;
     }else if(N==A&&N==B){
       min = B;
     }else{
       min = (A + B) - N;
     }
    console.log(max + ' ' +min);
   }
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));
//  [python]
import sys

read = sys.stdin.read

N, H, W, *AB = map(int, read().split())
answer = 0
for a, b in zip(*[iter(AB)] * 2):
    if H <= a and W <= b:
        answer += 1

print(answer)
//  [python]
import sys

input = sys.stdin.readline
n, h, w = map(int, input().split())
cnt = 0
for _ in range(n):
    a, b = map(int, input().split())
    if a >= h and b >= w:
        cnt += 1
print(cnt)
//  [python]
n, h, w, *a = list(map(int, open(0).read().split()))

ans = 0
for a, b in zip(*[iter(a)]*2):
    ans += not(a < h or b < w)
print(ans)
//  [python]
#
import sys
import math
import numpy as np
import itertools

# いくつか入力
n,h,w = (int(i) for i in input().split())  

# n行複数列の数をリストに
ab = [[int(i) for i in input().split()] for i in range(n)] 

answer = 0

for i in range(n):
    if(h <= ab[i][0] and w <= ab[i][1]):
        answer += 1

print(answer)
//  [python]
import numpy as np
N,H,W = map(int,input().split())
ab=[]
for i in range(N):
    ab.append(list(map(int,input().split())))
ab=np.array(ab)
print(ab[(ab[:,0]>=H)&(ab[:,1]>=W)].shape[0])
//  [python]
import numpy as np

param = [int(i) for i in input().split()]
N = param[0]
H = param[1]
W = param[2]

material = np.empty([N,2],dtype=np.int)

for i in range(N):
    material[i,:] = [int(j) for j in input().split()]

count = np.array([material[:,0] >= H, material[:,1] >= W]).T
count = np.all(count==True, axis=1)
count = np.sum(count)
print(count)
//  [java]
import java.util.Map.Entry;
import java.io.*;
import java.util.*;

public class Main {
	
	static double[] dp;
	static int[] pow;
	
	public static void main(String[] args) throws IOException {
		FastScanner sc = new FastScanner(System.in);
		
		int N = sc.nextInt();
		int H = sc.nextInt();
		int W = sc.nextInt();
		int ans = 0;
		for(int i = 0; i < N; i++){
			int A = sc.nextInt();
			int B = sc.nextInt();
			if(A >= H && B >= W) ans++;
		}
		System.out.println(ans);
	}
}

class FastScanner {
    private InputStream in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    public FastScanner(InputStream in) {
		this.in = in;
	}
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() {
    	if (hasNextByte()) return buffer[ptr++];
    	else return -1;
    }
    private static boolean isPrintableChar(int c){
    	return 33 <= c && c <= 126;
    }
    public boolean hasNext() {
    	while(hasNextByte() && !isPrintableChar(buffer[ptr]))
    		ptr++; return hasNextByte();
    }
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() {
    	return Double.parseDouble(next());
    }
}
//  [java]
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int H = sc.nextInt();
		int W = sc.nextInt();

		int ans=0;

		for (int i=1;i<=N;i++) {
			int A = sc.nextInt();
			int B = sc.nextInt();
			if ((H<=A) && (W<=B)) {
					ans++;
			}
		}

		System.out.println(ans);

	}
}
//  [java]
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] NHW = Arrays.stream(br.readLine().split(" ")).mapToInt(Integer::parseInt).toArray();
		List<long[]> list = new ArrayList<>(NHW[0]);
		br.lines().forEach(s -> {
			long[] ab = Arrays.stream(s.split(" ")).mapToLong(Long::parseLong).toArray();
			list.add(ab);
		});
		br.close();
		System.out.println(list.stream().filter(n -> n[0] >= NHW[1] && n[1] >= NHW[2]).count());
	}

}
//  [java]
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner (System.in);
		
		int n, a, b, h, w, count = 0;
		n = sc.nextInt();
		h = sc.nextInt();
		w = sc.nextInt();
		for(int i = 0; i < n; ++i) {
			a = sc.nextInt();
			b = sc.nextInt();
			if(a >= h && b >= w)++count;
		}
		
		sc.close();
		
		System.out.println(count);
	}

}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> P;
typedef pair<int,int> Pi;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define fi first
#define se second
#define endl "\n"

template<typename T> inline bool chmax(T &a, T b){if(a<b){a=b;return true;}return false;}
template<typename T> inline bool chmin(T &a, T b){if(a>b){a=b;return true;}return false;}
template<typename T> ostream& operator<<(ostream& s,const complex<T>& d) {return s<<"("<<d.real()<<", "<<d.imag()<< ")";}
template<typename T1, typename T2> ostream& operator<<(ostream& s,const pair<T1,T2>& d) {return s<<"("<<d.first<<", "<<d.second<<")";}
template<typename T> ostream& operator<<(ostream& s, const vector<T>& d){
	int len=d.size();
	rep(i,len){
		s<<d[i];if(i<len-1) s<<" ";
	}
	return s;
}
template<typename T> ostream& operator<<(ostream& s,const vector<vector<T>>& d){
	int len=d.size();
	rep(i,len){
		s<<d[i]<<endl;
	}
	return s;
}
template<typename T> ostream& operator<<(ostream& s,const set<T>& v){
	s<<"{ ";
	for(auto itr=v.begin();itr!=v.end();++itr) {
		if (itr!=v.begin()) {s<< ", ";}
		s<<(*itr);
	}
	s<<" }";
	return s;
}
template<typename T1, typename T2> ostream& operator<<(ostream& s,const map<T1,T2>& m){
	s<<"{"<<endl;
	for(auto itr=m.begin();itr!=m.end();++itr){
		s<<" "<<(*itr).first<<" : "<<(*itr).second<<endl;
	}
	s<<"}"<<endl;
	return s;
}

const ll mod=1e9+7;
const ll inf=1e17;
const int INF=1e9;
const double PI=acos(-1);
const double EPS=1e-10;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n,h,w;
	cin>>n>>h>>w;
	int ans=0;
	rep(i,n){
		int a,b;
		cin>>a>>b;
		if(a>=h && b>=w) ans++;
	}
	cout<<ans<<endl;
}
//  [cpp]
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <iomanip>
#include <utility>
#include <tuple>
#include <functional>
#include <bitset>
#include <cassert>
#include <time.h>
#define int long long
#define endl '\n'
#define INF 1000000000000000000
#define all(a) a.begin(),a.end()
#define rep(i, n) for (int i = 0; i < (n); i++)
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<ll, P> PP;
template<class T, class S> bool chmax(T &a, const S &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T, class S> bool chmin(T &a, const S &b) { if (a > b) { a = b; return 1; } return 0; }
ll gcd(ll n, ll m) { return (m ? gcd(m, n%m) : n); }
ll lcm(ll n, ll m) { return n / gcd(n, m)*m; }
ll mod = 1000000007;
ll modsize;

ll modinv(ll a) {
	ll b = mod, u = 1, v = 0;
	while (b) {
		ll t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= mod;
	if (u < 0) u += mod;
	return u;
}

ll modpow(ll a, ll b) {
	ll ans = 1;
	a %= mod;
	while (b) {
		if (b & 1) ans = ans * a%mod;
		a = a * a%mod;
		b >>= 1;
	}
	return ans;
}

vector<ll> fac(modsize + 5);
vector<ll> inv(modsize + 5);
vector<ll> facinv(modsize + 5);

void modcalc() {
	fac[0] = fac[1] = 1; inv[1] = 1;
	facinv[0] = facinv[1] = 1;
	for (int i = 2; i < modsize; i++) {
		fac[i] = fac[i - 1] * i % mod;
		inv[i] = mod - inv[mod%i] * (mod / i) % mod;
		facinv[i] = facinv[i - 1] * inv[i] % mod;
	}
}

ll modcomb(ll n, ll k) {
	if (n < 0 || k < 0 || n < k) return 0;
	return fac[n] * facinv[k] % mod * facinv[n - k] % mod;
}

ll modperm(ll n, ll k) {
	if (n < 0 || k < 0 || n < k) return 0;
	return fac[n] * facinv[n - k] % mod;
}

ll modhom(ll n, ll k) {
	if (n < 0 || k < 0) return 0;
	if (n == 0 && k == 0) return 1;
	return modcomb(n + k - 1, k);
}

template<class T>
class segtree {
	int n;
	vector<T> data;
	T def;
	function<T(T, T)> operation;
	function<T(T, T)> update;
	T _query(int a, int b, int k, int l, int r) {
		if (r <= a || b <= l) return def;
		if (a <= l && r <= b) return data[k];
		T c1 = _query(a, b, 2 * k + 1, l, (l + r) / 2);
		T c2 = _query(a, b, 2 * k + 2, (l + r) / 2, r);
		return operation(c1, c2);
	}
public:
	segtree(size_t _n, T _def, function<T(T, T)> _operation, function<T(T, T)> _update)
		:def(_def), operation(_operation), update(_update) {
		n = 1;
		while (n < _n) {
			n *= 2;
		}
		data = vector<T>(2 * n - 1, def);
	}
	void change(int i, T x) {
		i += n - 1;
		data[i] = update(data[i], x);
		while (i > 0) {
			i = (i - 1) / 2;
			data[i] = operation(data[i * 2 + 1], data[i * 2 + 2]);
		}
	}
	T query(int a, int b) {
		return _query(a, b, 0, 0, n);
	}
	T operator[](int i) {
		return data[i + n - 1];
	}
};

signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(20);
	modcalc();
	
	int n, h, w;
	cin >> n >> h >> w;
	int ans = 0;
	int a, b;
	rep(i, n) {
		cin >> a >> b;
		ans += (a >= h)&(b >= w);
	}
	cout << ans << endl;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

// types
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pdd;
typedef vector<ll> vll;

// macros
#define ALL(a) a.begin(),a.end()
#define SZ(a) ((int)a.size())
#define FI first
#define SE second
#define REP(i,n) for(int i=0;i<((int)n);i++)
#define REP1(i,n) for(int i=1;i<((int)n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define PB push_back
#define EB emplace_back
#define MP(a,b) make_pair(a,b)
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define GET_POS(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
#define Decimal fixed<<setprecision(20)
#define INF 1000000000
#define LLINF 1000000000000000000LL

// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double eps = 1e-10;
const int MOD = 1e9 + 7;
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, -1, 0, 1};

int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  
  ll n,h,w;
  cin>> n>>h>>w;
  vll a(n),b(n);
  REP(i,n)cin>>a[i]>>b[i];
  
  ll ans = 0;
  REP(i,n){
    if(a[i]>=h && b[i]>=w)
      ans++;
  }
  
  cout<<ans<<endl;

}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
int ans,n,h,w;
int a[10000],b[10000];
int main(){
    cin>>n>>h>>w;;
    for(int i=0;i<n;i++){
        cin>>a[i]>>b[i];
    }

    for(int i=0;i<n;i++){
        if(a[i]>=h&&b[i]>=w)ans++;
    }
    cout<<ans<<endl;
}
//  [cpp]
#include <bits/stdc++.h>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;
using namespace std;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
const array<pair<int,int>,4> fd{make_pair(1,0),make_pair(-1,0),make_pair(0,1),make_pair(0,-1)}; 
//ll

int main(){
  int n,h,w;cin>>n>>h>>w;
  int ans = 0;
  rep(i,n){
    int a,b;cin>>a>>b;
    if(a>=h&&b>=w){
      ans++;
    }
  }
  cout << ans << endl;
}
//  [cpp]
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <map>
#include <numeric>
#include <cmath>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <complex>
#include <string.h>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <iomanip>
#include <sys/time.h>
#include <tuple>
#include <random>
using namespace std;

#define endl '\n'
#define ALL(v) (v).begin(), (v).end()
#define RALL(v) (v).rbegin(), (v).rend()
#define UNIQ(v) (v).erase(unique((v).begin(), (v).end()), (v).end())

typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
typedef complex<double> comp;
typedef vector< vector<ld> > matrix;
struct pairhash {
public:
    template<typename T, typename U>
    size_t operator()(const pair<T, U> &x) const {
	size_t seed = hash<T>()(x.first);
	return hash<U>()(x.second) + 0x9e3779b9 + (seed<<6) + (seed>>2);
    }
};
const int inf = 1e9 + 9;
const ll mod = 1e9 + 7;
const double eps = 1e-8;
const double pi = acos(-1);

int n, h, w;
int a[1010], b[1010];

int solve() {
    int res = 0;
    for (int i = 0; i < n; i++) {
        if (a[i] >= h && b[i] >= w)
            res++;
    }
    return res;
}

void input() {
    cin >> n >> h >> w;
    for (int i = 0; i < n; i++) cin >> a[i] >> b[i];
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(15);

    input();
    cout << solve() << endl;
}
//  [c]
#include <stdio.h>

int main(){
	int n,h,w;
	scanf("%d%d%d",&n,&h,&w);
	int ans=0;
	for(int i=0;i<n;i++){
		int a,b;
		scanf("%d%d",&a,&b);
		if(a>=h&&b>=w)ans++;
	}
	printf("%d",ans);
}
//  [c]
#include <stdio.h>
int main() {
	int n, h, w, a, b, ans = 0;
	scanf("%d%d%d", &n, &h, &w);
	for (int i = 0; i < n; i++) {
		scanf("%d%d", &a, &b);
		if (a >= h && b >= w) {
			ans++;
		}
	}
	printf("%d\n", ans);
	return 0;
}
//  [c]
#include<stdio.h>
long long p[1000],q[1000];
main()
{
	long long n,h,w,i,j,s=0,a,b;
	scanf("%lld %lld %lld",&n,&h,&w);
	for(i=0;i<n;i++)
	{
		scanf("%lld %lld",&p[i],&q[i]);
		a=p[i]/h;
		b=q[i]/w;
		if(a>b) s=s+b;
		else s=s+a;
	}
	printf("%lld",s);
}
//  [c]
#include <stdio.h>
 
int main(){
   long h,w,a,b;
   int i,c,n;
    
   scanf("%d %ld %ld",&n,&h,&w);
   for (c=i=0;i<n;i++) {
      scanf("%ld %ld",&a,&b);
      if (a>=h && b>=w) c++;
   }
   printf("%d\n",c);
   return 0;
}
//  [c]
#include <stdio.h>

int main()
{
    int N,TATE,YOKO,i,count=0;
    int tate,yoko;

    scanf("%d%d%d",&N,&TATE,&YOKO);

    for(i=0;i<N;i++){
        scanf("%d%d",&tate,&yoko);
        if(tate>=TATE && yoko>=YOKO){
            count++;
        }
    }

    printf("%d",count);
    return 0;
}
//  [c]
#include <stdio.h>

int main(void) {
	int N, H, W;
	int A, B;
	int i;
	int yukati = 0;
	if (scanf("%d%d%d", &N, &H, &W) != 3) return 1;
	for(i = 0; i < N; i++) {
		if (scanf("%d%d", &A, &B) != 2) return 1;
		yukati += A >= H && B >= W;
	}
	printf("%d\n", yukati);
	return 0;
}
//  [javascript]
function main(input) {
    const args = input.split('\n');
    const Fir = args[0].split(' ');

    const N = parseInt(Fir[0]);
    const H = parseInt(Fir[1]);
    const W = parseInt(Fir[2]);

    var ans = 0;

    for(var i = 1; i <= N; i++) {
        var materials = args[i].split(' ');
        var material_H = parseInt(materials[0]);
        var material_W = parseInt(materials[1]);

        if (H <= material_H && W <= material_W) {
            ans++;
        }
    }
    console.log(ans);

}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function Main(input) {
    var maisu = 0;
    var input = input.split("\n");
    var one = input[0].split(" ");
    var N = parseInt(one[0]);
    var H = parseInt(one[1]);
    var W = parseInt(one[2]);
    for(i = 1; i <= N; i++){
        var hantei = input[i].split(" ");
        var A = parseInt(hantei[0]);
        if(H > A) continue;
        var B = parseInt(hantei[1]);
        if(W <= B) maisu++;
    }
	console.log(maisu);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
	input = input.split("\n");
	var mem = input[0].split(" ").map(Number);
	var sum = 0;
	for(var i=1;i<input.length;i++){
		var n = input[i].split(" ").map(Number);
		if(n[0]>=mem[1]&&n[1]>=mem[2]) sum++;
	}
	console.log(sum)
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
//  [javascript]
function Main(input) {
  // 入力
  input = input.split('\n');
	tmp = input[0].split(' ');
	var n = parseInt(tmp[0], 10);
  var h = parseInt(tmp[1], 10);
  var w = parseInt(tmp[2], 10);
  var count = 0;

  // 計算
  for (var i = 1; i <= n; i++) {
    var num = input[i].split(' ');
    var a = parseInt(num[0], 10);
    var b = parseInt(num[1], 10);
    if (a >= h && b>= w) {
      count++;
    }
  }
  
	//出力
	console.log('%d', count);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function main(arg) {
	var header = arg.split("\n")[0].split(" ")

	var N = header[0]
	var H = Number(header[1])
	var W = Number(header[2])
	var count = 0
	arg = arg.split("\n")
	arg.shift()

	arg = arg.map(e => e.split(" ").map(ee => Number(ee)))

	for (var i = 0; i < arg.length; i++) {
		var row = arg[i]
		if (row[0] >= H && row[1] >= W) {
			count++
		}
	}

	console.log(count)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
'use strict'

const main = (INPUT) => {
  const input = INPUT.split('\n')
  const N = Number(input[0].split(' ')[0])
  const H = Number(input[0].split(' ')[1])
  const W = Number(input[0].split(' ')[2])
  const ary = input.slice(1)

  let cnt = 0
  for (let i = 0; i < N; i++) {
    let A = Number(ary[i].split(' ')[0])
    let B = Number(ary[i].split(' ')[1])
    if (H <= A && W <= B) {
      cnt++
    }
  }
  console.log(cnt)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

func out(x ...interface{}) {
	fmt.Println(x...)
}

var sc = bufio.NewScanner(os.Stdin)

func getInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func getString() string {
	sc.Scan()
	return sc.Text()
}

// min, max, asub, absなど基本関数
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func asub(a, b int) int {
	if a > b {
		return a - b
	}
	return b - a
}

func abs(a int) int {
	if a >= 0 {
		return a
	}
	return -a
}

func lowerBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] >= x
	})
	return idx
}

func upperBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] > x
	})
	return idx
}

func main() {
	sc.Split(bufio.ScanWords)

	N, H, W := getInt(), getInt(), getInt()
	a := make([]int, N)
	b := make([]int, N)
	for i := 0; i < N; i++ {
		a[i], b[i] = getInt(), getInt()
	}
	ans := 0
	for i := 0; i < N; i++ {
		if H <= a[i] && W <= b[i] {
			ans++
		}
	}
	out(ans)
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	sc.Scan()
	i, _ := strconv.Atoi(sc.Text())
	return i
}

func nextFloat64() float64 {
	f, _ := strconv.ParseFloat(next(), 64)
	return f
}

func nextInts(n int) []int {
	slice := make([]int, n)
	for i := 0; i < n; i++ {
		slice[i] = nextInt()
	}
	return slice
}

func main() {
	sc.Split(bufio.ScanWords)
	n, h, w := nextInt(), nextInt(), nextInt()
	ans := 0
	for i := 0; i < n; i++ {
		a, b := nextInt(), nextInt()
		if a >= h && b >= w {
			ans++
		}
	}
	fmt.Println(ans)
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func getScanner(fp *os.File) *bufio.Scanner {
	scanner := bufio.NewScanner(fp)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 1000005), 1000005)
	return scanner
}

func getNextString(scanner *bufio.Scanner) string {
	scanner.Scan()
	return scanner.Text()
}

func getNextInt(scanner *bufio.Scanner) int {
	i, _ := strconv.Atoi(getNextString(scanner))
	return i
}

func getNextInt64(scanner *bufio.Scanner) int64 {
	i, _ := strconv.ParseInt(getNextString(scanner), 10, 64)
	return i
}

func getNextUint64(scanner *bufio.Scanner) uint64 {
	i, _ := strconv.ParseUint(getNextString(scanner), 10, 64)
	return i
}

func getNextFloat64(scanner *bufio.Scanner) float64 {
	i, _ := strconv.ParseFloat(getNextString(scanner), 64)
	return i
}

func main() {
	fp := os.Stdin
	wfp := os.Stdout
	cnt := 0

	if os.Getenv("MASPY") == "ますピ" {
		fp, _ = os.Open(os.Getenv("BEET_THE_HARMONY_OF_PERFECT"))
		cnt = 1
	}
	if os.Getenv("MASPYPY") == "ますピッピ" {
		wfp, _ = os.Create(os.Getenv("NGTKANA_IS_GENIUS10"))
	}

	scanner := getScanner(fp)
	writer := bufio.NewWriter(wfp)
	solve(scanner, writer)
	for i := 0; i < cnt; i++ {
		fmt.Fprintln(writer, "-----------------------------------")
		solve(scanner, writer)
	}
	writer.Flush()
}

func solve(scanner *bufio.Scanner, writer *bufio.Writer) {
	n := getNextInt(scanner)
	h := getNextInt(scanner)
	w := getNextInt(scanner)

	ans := 0
	for i := 0; i < n; i++ {
		a := getNextInt(scanner)
		b := getNextInt(scanner)
		if h > a {
			continue
		}
		if w > b {
			continue
		}
		ans++
	}

	fmt.Fprintln(writer, ans)
}
//  [go]
package main

import "fmt"

func main() {
	var n, h, w int
	fmt.Scan(&n, &h, &w)
	cnt := 0
	for i := 0; i < n ;i++{
		var a, b int
		fmt.Scan(&a, &b)
		if(a >= h && b >= w) {
			cnt++
		}
	}
	fmt.Println(cnt)
}
//  [go]
package main

import "fmt"

func main() {
	// Code for B - AtCoder Alloy
	var N, H, W int
	fmt.Scanf("%d %d %d", &N, &H, &W)

	var A, B int
	var ans int
	for i := 0; i < N; i++ {
		fmt.Scanf("%d %d", &A, &B)
		if A >= H && B >= W {
			ans++
		}
	}

	fmt.Println(ans)
}
//  [go]
package main

import (
	"fmt"
	"os"
	"strconv"
	"strings"
	"bufio"
)

var (
	sc = bufio.NewScanner(os.Stdin)
	buf = make([]byte, 1000)
)

func scanText() string{
	sc.Scan()
	return sc.Text()
}

func scanTextArray(n int) []string {
	out := make([]string, n)
	for i, v := range(strings.Split(scanText(), "")) {
		out[i] = v
	}
	return out
}

func scanInt() int {
	out, e := strconv.Atoi(scanText())
	if e != nil {
        panic(e)
    }
	return out
}

func scanIntArray(n int) []int {
	out := make([]int, n)
	for i, v := range(strings.Split(scanText(), " ")) {
		num, e := strconv.Atoi(v)
		if e != nil {
			panic(e)
		}
		out[i] = num
	}
	return out
}
//  template end

func main() {
	sc.Buffer(buf, 10000)
	nhw := scanIntArray(3)
	N, H, W := nhw[0], nhw[1], nhw[2]
	ans := 0
	for i:=0; i<N; i++ {
		ab := scanIntArray(2)
		if ab[0] >= H && ab[1] >= W {
			ans++
		}
	}
	fmt.Println(ans)
}
//  [ruby]
n,h,w,*a=$<.read.split.map(&:to_i)
c=0
n.times{|i|
  c+=1 if h<=a[i*2] and w<=a[i*2+1]
}
p c
//  [ruby]
n, h, w = gets.chomp.split.map(&:to_i)
ans = 0
n.times do
  a, b = gets.chomp.split.map(&:to_i)
  if a >= h && b >= w
    ans += 1
  end
end
p ans
//  [ruby]
n, h, w = gets.split.map(&:to_i)
a, b = Array.new(n) { gets.split.map(&:to_i) }.transpose

puts a.zip(b).count { |a, b| a >= h && b >= w }
//  [ruby]
n, h ,w = gets.split.map(&:to_i)
num = 0
n.times do
  a,b = gets.split.map(&:to_i)
  num += 1 if a >= h && b >= w
end
puts num
//  [ruby]
n, h, w = gets.split.map(&:to_i)

p n.times.count {
    a, b = gets.split.map(&:to_i)
    a >= h && b >= w
}
//  [ruby]
n, h, w = gets.chomp.split.map(&:to_i)
cnt = 0
n.times do 
	a, b = gets.chomp.split.map(&:to_i)
	cnt += 1 if a >= h && b >= w
end
puts cnt
//  [rust]
use std::str::FromStr;
use std::fmt::Debug;
use std::cmp;
#[allow(dead_code)]
fn read_as_vec<T>() -> Vec<T>
where T: FromStr, <T as FromStr>::Err : Debug{
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().split_whitespace().map(|c| T::from_str(c).unwrap()).collect()

}

#[allow(dead_code)]
fn read_as_string() -> String{
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().to_string()
}

fn main(){
    let line = read_as_vec::<u64>();
    let (n, h, w) = (line[0], line[1], line[2]);
    let mut ans: u64 = 0;
    for _ in 0..n{
        let line = read_as_vec::<u64>();
        let (a, b) = (line[0], line[1]);
        if h <= a && w <= b{
            ans += 1;
        }
    }

    println!("{}", ans);
}
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input!{
        n: usize,
        h: usize,
        w: usize,
        ab: [(usize, usize);n],
    }
    println!("{}", ab.iter().filter(|x| x.0 >= h && x.1 >= w).count());
}
//  [rust]
fn main() {
    let mut buf = String::new();
    let handle = std::io::stdin();
    handle.read_line(&mut buf).unwrap();
    let info: Vec<usize> = buf.trim().split_whitespace().map(|a| a.parse().unwrap()).collect();
    let (n, h, w) = (info[0], info[1], info[2]);
    buf.clear();
    let mut count = 0;

    for i in 0..n {
        handle.read_line(&mut buf).unwrap();
        let board: Vec<usize> = buf.trim().split_whitespace().map(|a| a.parse().unwrap()).collect();
        if board[0] >= h && board[1] >= w {
            count += 1;
        }
        buf.clear();
    }
    println!("{}", count);
}
//  [rust]
use proconio::{input, fastout};

#[fastout]
fn main() {
    input!{
        (n, h, w): (i32, i32, i32),
        ab: [(i32, i32); n]
    };
    
    let mut ans = 0;
    for (a, b) in ab {
        if(a>=h && b>=w){
            ans += 1;
        }
    }
    println!("{}", ans);
}
//  [rust]
use proconio::input;

fn main() {
    input! {
        n: usize,
        h: i64,
        w: i64,
        ab: [(i64, i64); n],
    }

    let ans = ab.iter().filter(|(a, b)| h <= *a && w <= *b).count();

    println!("{}", ans);
}
//  [swift]
let i=readLine()!.characters.split(" ").map{Int(String($0))!},N=i[0],H=i[1],W=i[2]
var ans=0
for _ in 0..<N {
  let i=readLine()!.characters.split(" ").map{Int(String($0))!}
  if i[0]>=H&&i[1]>=W{ans++}
}
print(ans)
//  [swift]
import Foundation

extension String {
    
    func toStrList() -> [String] {
        return self.map{String($0)}
    }
    
    func toIntList() -> [Int] {
        return self.map{Int(String($0))!}
    }
    
    func toSepDoubleList() -> [Double]{
        return self.split(separator: " ").map{Double($0)!}
    }

    func toSepIntList() -> [Int] {
        return self.split(separator: " ").map{Int($0)!}
    }

    func toSepStrList() -> [String] {
        return self.split(separator: " ").map{String($0)}
    }
    
    func zFill(n:Int) -> String {
        return String(format: "%0\(n)d", Int(self)!)
    }
    
    func count(c:Character) -> Int{
        var result = 0

        for e in self{
            if e == c{
                result += 1
            }
        }
        return result
    }

    func counter() -> Dictionary<Character, Int>{
        var result:[Character:Int] = [:]
        
        for c in self{
            guard let _ = result.index(forKey: c) else {
                result[c] = 1
                continue
            }
            result[c]! += 1
        }
        return result
    }
}

extension Int {
    func toBin() -> String {
        return String(self, radix: 2)
    }
    
    func toNBin(_ radix:Int) -> String{
        return String(self, radix: radix)
    }
    
    func toD() -> Double {
        return Double(self)
    }
}

extension Double {
    func toI() -> Int {
        return Int(self)
    }
}

extension Array where Element: Equatable{
    func count(n:Self.Element) -> Int{
        var result = 0
        for e in self{
            if e == n{
                result += 1
            }
        }
        return result
    }
}

extension Array {
    func dump(){
        for x in 0..<self.count-1{
            print(self[x], terminator: " ")
        }
        print(self.last!)
    }
}

func pow(_ base:Int,_ exp:Int) -> Int{
    let d = pow(base.toD(), exp.toD())
    return Int(d)
}

func distance(p1:CGPoint, p2:CGPoint) -> Double {
    let diffp = CGPoint(x:p1.x - p2.x, y:p1.y - p2.y)
    return Double(sqrt(diffp.x*diffp.x + diffp.y * diffp.y))
}

func distance(p1:[Double], p2:[Double]) -> Double{
    let diff = [p1[0] - p2[0], p1[1] - p2[1]]
    return sqrt(diff[0] * diff[0] + diff[1] * diff[1])
    
}

func lotate(theta:Double, point:[Double]) -> [Double] {
    let matrix = [
        [cos(theta), -sin(theta)],
        [sin(theta), cos(theta)]
    ]
    let x = point[0]
    let y = point[1]
    
    let rx = matrix[0][0]*x + matrix[0][1]*y
    let ry = matrix[1][0]*x + matrix[1][1]*y
    
    return [rx, ry]
}


func caddi2018b() -> Int {
    let NHW = readLine()!.toSepIntList()
    var ans = 0
    for _ in 1...NHW[0]{
        let AB = readLine()!.toSepIntList()
        if AB[0] < NHW[1] || AB[1] < NHW[2] {
            continue
        }
        ans += 1
    }
    return ans
}

print(caddi2018b())
//  [typescript]
"use strict";
const Main = (input) =>{
   let xs = input.trim().split('\n');
   let N = Number(xs[0].split(' ')[0]);
   let H = Number(xs[0].split(' ')[1]);
   let W = Number(xs[0].split(' ')[2]);
   let A = xs.slice(1);
   let count = 0;
   
   for(let i=0; i<N; i++){
     if(H<=Number(A[i].split(' ')[0]) && W<=Number(A[i].split(' ')[1])){
       count++
     }
   }
     console.log(count);
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));
//  [typescript]
s=require('fs').readFileSync('/dev/stdin','utf8').split('\n');
[n,h,w]=s[0].split(' ')
for(i=1,r=0;i<=n;i++){
	[a,b]=s[i].split(' ').map(n=>n|0)
	a>=h&&b>=w&&r++
}
console.log(r)
//  [typescript]
s=require('fs').readFileSync('/dev/stdin','utf8').split('\n');
[n, h, w]=s[0].split(' ')
r=0
for(i=1;i<=n;i++){
	[a, b]=s[i].split(' ').map(n=>n|0)
	if (a >= h && b >= w) {
		r++
	}
}
console.log(r)
//  [typescript]
s=require('fs').readFileSync('/dev/stdin','utf8').split('\n');
[n,h,w]=s[0].split(' ').map(n=>n|0)
for(i=1,r=0;i<=n;i++){
	[a,b]=s[i].split(' ').map(n=>n|0)
	a>=h&&b>=w&&r++
}
console.log(r)
//  [python]
import math
INF, MOD = float("inf"), 1e9 + 7
MAX, MIN = -INF, INF
dx1, dy1, dx2, dy2 = [-1, 0, 1, 0], [0, -1, 0, 1], [-1, 0, 1, -1, 1, -1, 0, 1], [-1, -1, -1, 0, 0, 1, 1, 1]

def get_int():
    return int(input())

def get_int_list():
    return list(map(int, input().split()))

def mins(x, y):
    x = min(x, y)

def maxs(x, y):
    x = max(x, y)

while(True):
    try:
        cnt = [0] * 5
        for i in range(3):
            a, b = get_int_list()
            cnt[a] += 1
            cnt[b] += 1
        if cnt.count(2) == 2:
            print("YES")
        else:
            print("NO")
    except EOFError:
        exit()
//  [python]
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

l = [0]*4
for _ in range(3):
    a, b = map(int, input().split())
    l[a-1] += 1
    l[b-1] += 1

l = sorted(l)
if l[0] == 1 and l[1] == 1 and l[2] == 2 and l[3] == 2:
    print("YES")
else:
    print("NO")
//  [python]
l=[0]*4
for _ in range(3):
    a,b=map(int,input().split())
    a-=1
    b-=1
    l[a]+=1
    l[b]+=1
if sorted(l)==[1,1,2,2]:
  print('YES')
else:
  print('NO')
//  [python]
import numpy as np

ll = []
# li=[1,2,3,4,5,...,n]
li = list(map(int,input().split()))
ll += li
li = list(map(int,input().split()))
ll += li
li = list(map(int,input().split()))
ll += li

cnt = 0
cnt += ll.count(1)%2
cnt += ll.count(2)%2
cnt += ll.count(3)%2
cnt += ll.count(4)%2

if ll.count(1) > 2 or ll.count(2) > 2 or ll.count(3) > 2 or ll.count(4) > 2:
    print("NO")
    exit()

if cnt>2:
    print("NO")
else:
    print("YES")
//  [python]
import sys
import numpy as np

def parse(inp):
    road=np.array([],dtype=int)
    for i in range(3):
        road=np.append(road,np.array([list(next(inp).split())],dtype=int))
    return road
  
def main(inp):
    road=parse(inp)
    count=[0,0,0,0]
    for i in range(len(road)):
        count[road[i]-1]+=1
        if(count[road[i]-1]==3):
            return """NO
"""
            break
            
    return """YES
"""

print(main(sys.stdin))
//  [python]
import numpy as np
a1,b1 = list(map(int, input().split()))
a2,b2 = list(map(int, input().split()))
a3,b3 = list(map(int, input().split()))

a = [a1,a2,a3]
b = [b1,b2,b3]

from collections import Counter

c = Counter(a+b)

x = 0
y = 0
for k in c.keys():
    if c[k] == 1:
        x += 1

if x != 2:
    print('NO')
else:
    print('YES')
//  [java]
import java.io.*;

public class Main {

  public static void main(String[] args) throws IOException {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    int[] cnt = new int[5];

    String[] in;

    for(int i = 0; i < 3; i++){
      in = br.readLine().split(" ");
      int a = Integer.parseInt(in[0]);
      int b = Integer.parseInt(in[1]);
      cnt[a]++;
      cnt[b]++;
    }

    br.close();

    boolean ok = true;

    for(int i = 1; i <= 4; i++){
      if(cnt[i] > 2) ok = false;
    }

    System.out.println(ok ? "YES" : "NO");
    
  }
}