Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
#======================================================#
def main():
    h, w, m = MII()
    bombs = [MIIZ() for _ in range(m)]
    a = [0]*h
    b = [0]*w
    for y,x in bombs:
        a[y] += 1
        b[x] += 1
    maxa = max(a)
    maxb = max(b)
    sumv = maxa + maxb
    c = a.count(maxa)*b.count(maxb) - sum(a[y]+b[y] == sumv for y,x in bombs)
    print(sumv - (c<=0))

if __name__ == '__main__':
    main()

Fixed submission:
import sys
import numpy as np
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
#======================================================#
def main():
    h, w, m = MII()
    bombs = [MIIZ() for _ in range(m)]
    a = [0]*h
    b = [0]*w
    for y,x in bombs:
        a[y] += 1
        b[x] += 1
    maxa = max(a)
    maxb = max(b)
    sumv = maxa + maxb
    c = a.count(maxa)*b.count(maxb) - sum(a[y]+b[x] == sumv for y,x in bombs)
    print(sumv - (c<=0))

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
#======================================================#
def main():
    h, w, m = MII()
    bombs = [MIIZ() for _ in range(m)]
    area = np.zeros((h,w))
    for x, y in bombs:
        area[x:x+1, :] += 1
        area[:, y:y+1] += 1
        area[x:x+1, y:y+1] -= 1
    print(int(area.max()))

if __name__ == '__main__':
    main()

Fixed submission:
import sys
import numpy as np
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
#======================================================#
def main():
    h, w, m = MII()
    bombs = [MIIZ() for _ in range(m)]
    a = [0]*h
    b = [0]*w
    for y,x in bombs:
        a[y] += 1
        b[x] += 1
    maxa = max(a)
    maxb = max(b)
    sumv = maxa + maxb
    c = a.count(maxa)*b.count(maxb) - sum(a[y]+b[x] == sumv for y,x in bombs)
    print(sumv - (c<=0))

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
#======================================================#
def main():
    h, w, m = MII()
    bombs = [MIIZ() for _ in range(m)]
    area = np.zeros((h,w), dtype=int)
    # print(area)
    for x, y in bombs:
        area[x:x+1, :] += 1
        area[:, y:y+1] += 1
        area[x:x+1, y:y+1] -= 1
        # print(area)
    print(area.max())

if __name__ == '__main__':
    main()

Fixed submission:
import sys
import numpy as np
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
#======================================================#
def main():
    h, w, m = MII()
    bombs = [MIIZ() for _ in range(m)]
    a = [0]*h
    b = [0]*w
    for y,x in bombs:
        a[y] += 1
        b[x] += 1
    maxa = max(a)
    maxb = max(b)
    sumv = maxa + maxb
    c = a.count(maxa)*b.count(maxb) - sum(a[y]+b[x] == sumv for y,x in bombs)
    print(sumv - (c<=0))

if __name__ == '__main__':
    main()