s_1, s_2 = input(), input() A = s_1.split(sep=".") B_1, B_2 = [], [] for i in A: N = bin(int(i))[2:].zfill(8) B_1.append(N) IP_10 = int("".join(B_1), 2) print(IP_10) C = bin(int(s_2))[2:].zfill(32) L = len(C) for i in range(0, L, 8): B_2.append(C[i:i+8]) L_...