Buggy python submission (verdict: Runtime Error):
import numpy as np
import scipy as sp
import math

def main():
    # parse
    N, M = parse(get_stdin())
    # compute
    result = compute(N, M)
    # show result
    print(result)

def compute(N, M):
    a = abs(N - M)
    if a >= 2:
        return 0
    elif a == 1:
        return math.factorial(N) + math.factorial(M) / (10**9+7)
    else:
        return 2*math.factorial(N) + math.factorial(M) / (10**9+7)

def get_stdin():
    return input()

def split_stdin(stdin_val, delimiter = ' '):
    return [x for x in stdin_val.split(delimiter) if x != '']

def parse(stdin_vars):
    vars = split_stdin(stdin_vars)
    return int(vars[0]), int(vars[1])

if __name__ == "__main__":
    main()

Fixed submission:
import numpy as np
import scipy as sp
import math

def main():
    # parse
    N, M = parse(get_stdin())
    # compute
    result = compute(N, M)
    # show result
    print(result)

def compute(N, M):
    a = abs(N - M)
    if a >= 2:
        return 0
    elif a == 1:
        return (math.factorial(N) * math.factorial(M)) % (10**9+7)
    else:
        return 2*(math.factorial(N) * math.factorial(M)) % (10**9+7)

def get_stdin():
    return input()

def split_stdin(stdin_val, delimiter = ' '):
    return [x for x in stdin_val.split(delimiter) if x != '']

def parse(stdin_vars):
    vars = split_stdin(stdin_vars)
    return int(vars[0]), int(vars[1])

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
import numpy as np
import scipy as sp
import math

def main():
    # parse
    N, M = parse(get_stdin())
    # compute
    result = compute(N, M)
    # show result
    print(result)

def compute(N, M):
    a = abs(N - M)
    if a >= 2:
        return 0
    elif a == 1:
        return math.factorial(N) + math.factorial(M) / (10**9+7)
    else:
        return 2*math.factorial(N) + math.factorial(M) / (10**9+7)

def get_stdin():
    return input()

def split_stdin(stdin_val, delimiter = ' '):
    return [x for x in stdin_val.split(delimiter) if x != '']

def parse(stdin_vars):
    vars = split_stdin(stdin_vars)
    return int(vars[0]), int(vars[1])

if __name__ == "__main__":
    main()

Fixed submission:
import numpy as np
import scipy as sp
import math

def main():
    # parse
    N, M = parse(get_stdin())
    # compute
    result = compute(N, M)
    # show result
    print(result)

def compute(N, M):
    a = abs(N - M)
    if a >= 2:
        return 0
    elif a == 1:
        return (math.factorial(N) * math.factorial(M)) % (10**9+7)
    else:
        return 2*(math.factorial(N) * math.factorial(M)) % (10**9+7)

def get_stdin():
    return input()

def split_stdin(stdin_val, delimiter = ' '):
    return [x for x in stdin_val.split(delimiter) if x != '']

def parse(stdin_vars):
    vars = split_stdin(stdin_vars)
    return int(vars[0]), int(vars[1])

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
import numpy as np
import scipy as sp
import math

def main():
    # parse
    N, M = parse(get_stdin())
    # compute
    result = compute(N, M)
    # show result
    print(result)

def compute(N, M):
    a = abs(N - M)
    if a >= 2:
        return 0
    elif a == 1:
        return math.factorial(N) + math.factorial(M) / (10**9+7)
    else:
        return 2*math.factorial(N) + math.factorial(M) / (10**9+7)

def get_stdin():
    return input()

def split_stdin(stdin_val, delimiter = ' '):
    return [x for x in stdin_val.split(delimiter) if x != '']

def parse(stdin_vars):
    vars = split_stdin(stdin_vars)
    return int(vars[0]), int(vars[1])

if __name__ == "__main__":
    main()

Fixed submission:
import numpy as np
import scipy as sp
import math

def main():
    # parse
    N, M = parse(get_stdin())
    # compute
    result = compute(N, M)
    # show result
    print(result)

def compute(N, M):
    a = abs(N - M)
    if a >= 2:
        return 0
    elif a == 1:
        return (math.factorial(N) * math.factorial(M)) % (10**9+7)
    else:
        return 2*(math.factorial(N) * math.factorial(M)) % (10**9+7)

def get_stdin():
    return input()

def split_stdin(stdin_val, delimiter = ' '):
    return [x for x in stdin_val.split(delimiter) if x != '']

def parse(stdin_vars):
    vars = split_stdin(stdin_vars)
    return int(vars[0]), int(vars[1])

if __name__ == "__main__":
    main()