




from itertools import permutations



def       UpperCAmelCase__  (     lowerCamelCase   ):
  if num[3] % 2 != 0:
    return False

  if (num[2] + num[3] + num[4]) % 3 != 0:
    return False

  if num[5] % 5 != 0:
    return False

  lowercase    :Optional[int]      	=						[7, 11, 13, 17]
  for i, test in enumerate(lowerCamelCase   ):
    if (num[i + 4] * 100 + num[i + 5] * 10 + num[i + 6]) % test != 0:
      return False
  return True



def       UpperCAmelCase__  (     lowerCamelCase = 10   ):
  return sum(
      int("".join(map(lowerCamelCase,			lowerCamelCase   )   )   )
      for num in permutations(range(lowerCamelCase   )   )
      if is_substring_divisible(lowerCamelCase   )   )


if __name__ == "__main__":
     print(f'''{solution() = }''')









def       UpperCAmelCase__  (     lowerCamelCase,			lowerCamelCase   ):
  return int((input_a, input_a).count(0   ) != 0   )



def       UpperCAmelCase__  (     ):
  assert nand_gate(0,			0   ) == 1
  assert nand_gate(0,			1   ) == 1
  assert nand_gate(1,			0   ) == 1
  assert nand_gate(1,			1   ) == 0


if __name__ == "__main__":
     print(nand_gate(0, 0))
     print(nand_gate(0, 1))
     print(nand_gate(1, 0))
     print(nand_gate(1, 1))



