def migratoryBirds(arr):
    # Write your code here
    return max(set(arr), key = arr.count)
def divisibleSumPairs(n, k, ar):
    # Write your code here
    
    # i < j
    cnt = 0
    for head in range(len(ar)):
        tail = head + 1
        while tail < n:
            if (ar[head] + ar[tail]) % k == 0:
                cnt += 1
                
            tail += 1
            
    return cnt
def birthday(s, d, m):
    # Write your code here
    cnt = 0
    for i in range(len(s) - m + 1):
        subset = sum(s[i:i + m])
        if subset == d:
            cnt += 1
            
    return cnt
def breakingRecords(scores):
    # Write your code here
    max_score = scores[0];min_score = scores[0]
    max_break = 0;min_break = 0
    
    for score in scores[1:]:
        if score > max_score:
            max_score = score
            max_break += 1       
        elif score < min_score:
            min_score = score
            min_break += 1
            
    return [max_break, min_break]
def getTotalX(a, b):
    # Write your code here
    def gcd(x, y):
        if x > y:
            s = y
            y = x
            x = s
        # x < y
        while(y > 0):
            x, y = y, x % y
        return x
    
    def lcm(x, y):
        return x * y // gcd(x, y)
    
    _lcm = a[0]
    for i in range(1, len(a)):
        _lcm = lcm(_lcm, a[i])
    
    if _lcm > 100:
        return 0
    
    _gcd = b[0]
    for i in range(1, len(b)):
        _gcd = gcd(_gcd, b[i])
            
    if (_gcd == 0) or (_lcm > _gcd):
        return 0 
    
    cnt = 0 
    for i in range(_lcm, _gcd + 1):
    	# b의 약수이고, a의 배수인 경우
        if (i % _lcm == 0) and (_gcd % i == 0):
            cnt += 1
            
    return cnt