n=int(input())
lst1=[]
for i in range(n):
    x=int(input())
    lst1.append(x)
z=int(input())
lst2=[]
for i in lst1:
    y=z-i
    lst2.append(y)
for i in range(len(lst1)):
    print(lst1[i],end=",")
    print(lst2[i])
d090b97ef68122c4fd747c632fc76ea3e1452ddb
<mask token>

<mask token>
for i in range(n):
    x = int(input())
    lst1.append(x)
<mask token>
for i in lst1:
    y = z - i
    lst2.append(y)
for i in range(len(lst1)):
    print(lst1[i], end=',')
    print(lst2[i])

n = int(input())
lst1 = []
for i in range(n):
    x = int(input())
    lst1.append(x)
z = int(input())
lst2 = []
for i in lst1:
    y = z - i
    lst2.append(y)
for i in range(len(lst1)):
    print(lst1[i], end=',')
    print(lst2[i])

n=int(input())
lst1=[]
for i in range(n):
    x=int(input())
    lst1.append(x)
z=int(input())
lst2=[]
for i in lst1:
    y=z-i
    lst2.append(y)
for i in range(len(lst1)):
    print(lst1[i],end=",")
    print(lst2[i])