Buggy python submission (verdict: Runtime Error):
import sys

for i in sys.stdin:
    lst = i.split(' ')
    n = 1
    while n <= lst[0]:
        lst = map(int, lst)
        if lst[0]%n == 0 and lst[1]%(lst[0]/n) == 0:
            print lst[0]/n
            break
        n = n+1
    else:
        print 1

Fixed submission:
import sys                                               
for i in sys.stdin:
    lst = i.split(' ')
    lst = map(int, lst)
    lst.sort()

    n = 1
    maxn = 1
    while n*n <= lst[0]:
        if lst[0]%n == 0 and lst[1]%(lst[0]/n) == 0:
            print lst[0]/n
            break
        elif lst[0]%n == 0 and lst[1]%n == 0:
            maxn = n
        n = n+1
    else:
        print maxn
    sys.exit(0)

Buggy python submission (verdict: Time Limit Exceeded):
import sys

for i in sys.stdin:
    lst = i.split(' ')
    n = 1
    while n <= lst[0]:
        lst = map(int, lst)
        if lst[0]%n == 0 and lst[1]%(lst[0]/n) == 0:
            print lst[0]/n
            break
        n = n+1
    else:
        print 1
    sys.exit(0)

Fixed submission:
import sys                                               
for i in sys.stdin:
    lst = i.split(' ')
    lst = map(int, lst)
    lst.sort()

    n = 1
    maxn = 1
    while n*n <= lst[0]:
        if lst[0]%n == 0 and lst[1]%(lst[0]/n) == 0:
            print lst[0]/n
            break
        elif lst[0]%n == 0 and lst[1]%n == 0:
            maxn = n
        n = n+1
    else:
        print maxn
    sys.exit(0)

Buggy python submission (verdict: Runtime Error):
# -*- coding: euc-jp -*-                                 
import sys
# ?????????                                                 
for i in sys.stdin:
    # ????????§???????????????2????????°?????????????????????????????????      
    lst = i.split(' ')
    lst = map(int, lst)
    lst.sort()

    # 1????????????????°???????????????°???/2?????§??°?????????            
    n = 1
    while n <= lst[0]/2:
        # ???????????????????????°???????????????????????????             
        if lst[0]%n == 0 and lst[1]%(lst[0]/n) == 0:
           print lst[0]/n
           break
        n = n+1
    else:
        print 1
    sys.exit(0)

Fixed submission:
import sys                                               
for i in sys.stdin:
    lst = i.split(' ')
    lst = map(int, lst)
    lst.sort()

    n = 1
    maxn = 1
    while n*n <= lst[0]:
        if lst[0]%n == 0 and lst[1]%(lst[0]/n) == 0:
            print lst[0]/n
            break
        elif lst[0]%n == 0 and lst[1]%n == 0:
            maxn = n
        n = n+1
    else:
        print maxn
    sys.exit(0)

Buggy python submission (verdict: Runtime Error):
# -*- coding: euc-jp -*-                                 
import sys
# ?????????                                                 
for i in sys.stdin:
    # ????????§???????????????2????????°?????????????????????????????????      
    lst = i.split(' ')
    lst = map(int, lst)
    lst.sort()

    # 1????????????????°???????????????°???/2?????§??°?????????            
    n = 1
    while n <= lst[0]/2:
        # ???????????????????????°???????????????????????????             
        if lst[0]%n == 0 and lst[1]%(lst[0]/n) == 0:
           print lst[0]/n
           break
        n = n+1
    else:
        print 1
    sys.exit(0)

Fixed submission:
import sys                                               
for i in sys.stdin:
    lst = i.split(' ')
    lst = map(int, lst)
    lst.sort()

    n = 1
    maxn = 1
    while n*n <= lst[0]:
        if lst[0]%n == 0 and lst[1]%(lst[0]/n) == 0:
            print lst[0]/n
            break
        elif lst[0]%n == 0 and lst[1]%n == 0:
            maxn = n
        n = n+1
    else:
        print maxn
    sys.exit(0)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
for i in sys.stdin:
    lst = i.split(' ')
    lst = map(int, lst)
    lst.sort()
 
    n = 1
    while n <= lst[0]/2:          
        if lst[0]%n == 0 and lst[1]%(lst[0]/n) == 0:
           print lst[0]/n
           break
        n = n+1
    else:
        print 1
    sys.exit(0)

Fixed submission:
import sys                                               
for i in sys.stdin:
    lst = i.split(' ')
    lst = map(int, lst)
    lst.sort()

    n = 1
    maxn = 1
    while n*n <= lst[0]:
        if lst[0]%n == 0 and lst[1]%(lst[0]/n) == 0:
            print lst[0]/n
            break
        elif lst[0]%n == 0 and lst[1]%n == 0:
            maxn = n
        n = n+1
    else:
        print maxn
    sys.exit(0)