<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_mastercard(n):
 """Checks if credit card number fits the mastercard format."""

    n, length = str(n), len(str(n))

    if length >= 16 and length <= 19:
        if ''.join(n[:2]) in strings_between(51, 56):
            return True
    return False