Buggy python submission (verdict: Runtime Error):
cond=input().split(" ")
n=int(cond[0])
m=int(cond[1])
q=int(cond[2])
train=[[0 for i in range(2)] for j in range(m)]
sect=[[0 for i in range(2)] for j in range(q)]

def judge(arr_m,arr_q):
    a=0
    if arr_q[0]<=arr_m[0] and arr_m[1]<=arr_q[1]:
        a=1
    return a

for i in range(m):
    train[i]=input().split(" ")
    train[i]=list(map(int,train[i]))
for i in range(q):
    sect[i]=input().split(" ")
    sect[i]=list(map(int,sect[i]))
for i in range(q):
    ans=0
    for j in range(m):
        ans+=judge(train[j],sect[i])
    print(ans)

Fixed submission:
nums=input().split(" ")
print((int(nums[0])-1)*(int(nums[1])-1))

Buggy python submission (verdict: Runtime Error):
cond=input().split(" ")
n=int(cond[0])
m=int(cond[1])
q=int(cond[2])
train=[[0 for i in range(2)] for j in range(m)]
sect=[[0 for i in range(2)] for j in range(q)]

def judge(arr_m,arr_q):
    a=0
    if arr_q[0]<=arr_m[0] and arr_m[1]<=arr_q[1]:
        a=1
    return a

for i in range(m):
    train[i]=input().split(" ")
    train[i]=list(map(int,train[i]))
for i in range(q):
    sect[i]=input().split(" ")
    sect[i]=list(map(int,sect[i]))
for i in range(q):
    ans=0
    for j in range(m):
        ans+=judge(train[j],sect[i])
    print(ans)

Fixed submission:
nums=input().split(" ")
print((int(nums[0])-1)*(int(nums[1])-1))

Buggy python submission (verdict: Runtime Error):
cond=input().split(" ")
n=int(cond[0])
m=int(cond[1])
q=int(cond[2])
train=[[0 for i in range(2)] for j in range(m)]
sect=[[0 for i in range(2)] for j in range(q)]
#print(train)
 
def judge(arr_m,arr_q):
    a=0
    #print(arr_m)
    #print(arr_q)
    #print("*")
    if arr_q[0]<=arr_m[0] and arr_m[1]<=arr_q[1]:
        a=1
    return a
for i in range(m):
    train[i]=input().split(" ")
    train[i]=list(map(int,train[i]))
    #print(train)
for i in range(q):
    sect[i]=input().split(" ")
    sect[i]=list(map(int,sect[i]))
    #print(sect)
for i in range(q):
    ans=0
    for j in range(m):
        ans+=judge(train[j],sect[i])
    print(ans)

Fixed submission:
nums=input().split(" ")
print((int(nums[0])-1)*(int(nums[1])-1))

Buggy python submission (verdict: Runtime Error):
cond=input().split(" ")
n=int(cond[0])
m=int(cond[1])
q=int(cond[2])
train=[[0 for i in range(2)] for j in range(m)]
sect=[[0 for i in range(2)] for j in range(q)]
#print(train)

def judge(arr_m,arr_q):
    a=0
    #print(arr_m)
    #print(arr_q)
    #print("*")
    if arr_q[0]<=arr_m[0] and arr_m[1]<=arr_q[1]:
        a=1
    return a

for i in range(m):
    train[i]=input().split(" ")
    train[i]=list(map(int,train[i]))
    #print(train)
for i in range(q):
    sect[i]=input().split(" ")
    sect[i]=list(map(int,sect[i]))
    #print(sect)
for i in range(q):
    ans=0
    for j in range(m):
        ans+=judge(train[j],sect[i])
    print(ans)

Fixed submission:
nums=input().split(" ")
print((int(nums[0])-1)*(int(nums[1])-1))

Buggy python submission (verdict: Runtime Error):
cond=input().split(" ")
n=int(cond[0])
m=int(cond[1])
q=int(cond[2])
train=[[0 for i in range(2)] for j in range(m)]
sect=[[0 for i in range(2)] for j in range(q)]
#print(train)
 
def judge(arr_m,arr_q):
    a=0
    #print(arr_m)
    #print(arr_q)
    #print("*")
    if arr_q[0]<=arr_m[0] and arr_m[1]<=arr_q[1]:
        a=1
    return a
 
for i in range(m):
    train[i]=input().split(" ")
    train[i]=list(map(int,train[i]))
    #print(train)
for i in range(q):
    sect[i]=input().split(" ")
    sect[i]=list(map(int,sect[i]))
    #print(sect)
for i in range(q):
    ans=0
    for j in range(m):
        ans+=judge(train[j],sect[i])
    print(ans)

Fixed submission:
nums=input().split(" ")
print((int(nums[0])-1)*(int(nums[1])-1))

Buggy python submission (verdict: Runtime Error):
#Beginner Contest 106 C
cond=input().split(" ")
n=int(cond[0])
m=int(cond[1])
q=int(cond[2])
train=[[0 for i in range(2)] for j in range(m)]
sect=[[0 for i in range(2)] for j in range(q)]
#print(train)

def judge(arr_m,arr_q):
    a=0
    #print(arr_m)
    #print(arr_q)
    #print("*")
    if arr_q[0]<=arr_m[0] and arr_m[1]<=arr_q[1]:
        a=1
    return a

for i in range(m):
    train[i]=input().split(" ")
    train[i]=list(map(int,train[i]))
    #print(train)
for i in range(q):
    sect[i]=input().split(" ")
    sect[i]=list(map(int,sect[i]))
    #print(sect)
for i in range(q):
    ans=0
    for j in range(m):
        ans+=judge(train[j],sect[i])
    print(ans)

Fixed submission:
nums=input().split(" ")
print((int(nums[0])-1)*(int(nums[1])-1))

Buggy python submission (verdict: Runtime Error):
cond=input().split(" ")
n=int(cond[0])
m=int(cond[1])
q=int(cond[2])
train=[[0 for i in range(2)] for j in range(m)]
sect=[[0 for i in range(2)] for j in range(q)]

def judge(arr_m,arr_q):
    a=0
    if arr_q[0]<=arr_m[0] and arr_m[1]<=arr_q[1]:
        a=1
    return a

for i in range(m):
    train[i]=input().split(" ")
    train[i]=list(map(int,train[i]))
for i in range(q):
    sect[i]=input().split(" ")
    sect[i]=list(map(int,sect[i]))
for i in range(q):
    ans=0
    for j in range(m):
        ans+=judge(train[j],sect[i])
    print(ans)

Fixed submission:
nums=input().split(" ")
print((int(nums[0])-1)*(int(nums[1])-1))

Buggy python submission (verdict: Runtime Error):
cond=input().split(" ")
n=int(cond[0])
m=int(cond[1])
q=int(cond[2])
train=[[0 for i in range(2)] for j in range(m)]
sect=[[0 for i in range(2)] for j in range(q)]


def judge(arr_m,arr_q):
    a=0
    
    if arr_q[0]<=arr_m[0] and arr_m[1]<=arr_q[1]:
        a=1
    return a

for i in range(m):
    train[i]=input().split(" ")
    train[i]=list(map(int,train[i]))
for i in range(q):
    sect[i]=input().split(" ")
    sect[i]=list(map(int,sect[i]))
for i in range(q):
    ans=0
    for j in range(m):
        ans+=judge(train[j],sect[i])
    print(ans)

Fixed submission:
nums=input().split(" ")
print((int(nums[0])-1)*(int(nums[1])-1))

Buggy python submission (verdict: Runtime Error):
cond=input().split(" ")
n=int(cond[0])
m=int(cond[1])
q=int(cond[2])
train=[[0 for i in range(2)] for j in range(m)]
sect=[[0 for i in range(2)] for j in range(q)]


def judge(arr_m,arr_q):
    a=0
    
    if int(arr_q[0])<=int(arr_m[0]) and int(arr_m[1])<=int(arr_q[1]):
        a=1
    return a

for i in range(m):
    train[i]=input().split(" ")
for i in range(q):
    sect[i]=input().split(" ")
for i in range(q):
    ans=0
    for j in range(m):
        ans+=judge(train[j],sect[i])
    print(ans)

Fixed submission:
nums=input().split(" ")
print((int(nums[0])-1)*(int(nums[1])-1))