Chef likes strings a lot but he likes palindromic strings more. Today, Chef has two strings A and B, each consisting of lower case alphabets.

Chef is eager to know whether it is possible to choose some non empty strings s1 and s2 where s1 is a substring of A, s2 is a substring of B such that s1 + s2 is a palindromic string. Here '+' denotes the concatenation between the strings.
Note:
A string is a palindromic string if it can be read same both forward as well as backward. To know more about palindromes click here.

-----Input-----
- First line of input contains a single integer T denoting the number of test cases.
- For each test case:
	
- First line contains the string A
- Second line contains the string B.

-----Output-----
For each test case, Print "Yes" (without quotes) if it possible to choose such strings s1 & s2. Print "No" (without quotes) otherwise.


-----Constraints-----
- 1 ≤ T ≤ 10 
- 1 ≤ |A|, |B| ≤ 1000 

-----Subtasks-----
-  Subtask 1: 1 ≤ |A|, |B| ≤ 10 : ( 40 pts )
-  Subtask 2: 1 ≤ |A|, |B| ≤ 1000 : ( 60 pts )

-----Example-----Input
3
abc
abc
a
b
abba
baab

Output
Yes
No
Yes

-----Explanation-----
- Test 1: One possible way of choosing s1 & s2 is s1 = "ab", s2 = "a" such that s1 + s2 i.e "aba" is a palindrome.
- Test 2: There is no possible way to choose s1 & s2 such that s1 + s2 is a palindrome.
- Test 3: You can figure it out yourself.

Starter code:

Solutions:
t=int(input())
for _ in range (t):
 str1=input()
 str2=input()
 res='No'
 for i in str1:
  if i in str2:
   res='Yes'
   break
 print(res)


for _ in range(int(input())):
 str1=input()
 str2=input()
 res='No'
 for i in str1:
  if i in str2:
   res='Yes'
   break
 print(res)

# cook your dish here
t = int(input())
for i in range(t):
 a = input()
 b= input()
 c=0
 for i in a:
  if i in b:
   c=1
   break
  else:
   continue
 if c==1:
  print("Yes")
 else:
  print("No")


T=int(input())
for i in range(T):
 A=input()
 B=input()
 flag=0
 for i in A:
  if i in B:
   flag=1
   break
 if(flag==0):
  print("No")
 else:
  print("Yes")


for _ in range(int(input())):
 a=set(list(input()))
 b=set(list(input()))
 if len(a&b)==0:
  print('No')
 else:
  print('Yes')


a=int(input())
while a:
 a=a-1
 b=input()
 c=input()
 p=[]
 for i in c:
  if i not in p:
   p.append(i) 
 f=0 
 for i in b:
  if i not in p:
   continue 
  else:
   f=1 
   break
 if f==1:
  print("Yes")
 else:
  print("No")


for _ in range(int(input())):
 s1,s2=input(),input()
 for i in s1:
  if i in s2:
   print("Yes")
   break
 else:
  print("No")

# cook your dish here
for _ in range(int(input())):
 a=input()
 b=input()
 for i in b:
  if(i in a):
   print("Yes")
   break
 else:
  print("No")

t=int(input())
for x in range(t):
 a=input()
 b=input()
 flag=False
 for i in a:
  if i in b:
   flag=True
   break
 if flag :
  print("Yes")
 else:
  print("No")
  



# cook your dish here
for i in range(int(input())):
 s1=input()
 s2=input()
 c=0
 for i in s1:
  for j in s2:
   if(i==j):
    c+=1
 if(c>0):
  print('Yes')
 else:
  print('No')

# cook your dish here
t=int(input())
for _ in range(t):
 a=str(input())
 b=str(input())
 k=0
 for i in a:
  for j in b:
   if(i==j):
    k+=1
 if(k>0):
  print('Yes')
 else:
  print('No')

# cook your dish here
t=int(input())
for ts in range(t):
 s1=str(input())
 s2=str(input())
 c=0
 for i in s1:
  for j in s2:
   if(i==j):
    c=c+1
 if(c>0):
  print('Yes')
 else:
  print('No')

# cook your dish here
t = int(input())
for z in range(t) :
 a = input()
 b = input()
 s1 = set(a)
 s2 = set(b)
 if s1&s2 :
  print("Yes")
 else:
  print("No")

# cook your dish here
t=int(input())
for ts in range(t):
 s1=str(input())
 s2=str(input())
 c=0
 for i in s1:
  for j in s2:
   if(i==j):
    c=c+1
 if(c>0):
  print('Yes')
 else:
  print('No')

# cook your dish here
x=int(input())
for i in range(x):
 s1=str(input())
 s2=str(input())
 c=0
 for j in s1:
  for k in s2:
   if(j==k):
    c=c+1
 if(c>0):
  print('Yes')
 else:
  print('No')

# cook your dish her
for _ in range(int(input())):
 x=set(input())
 y=set(input())
 if(len(x&y)):
  print('Yes')
 else:
  print('No')


# cook your dish here
for i in range(int(input())):
 s1=set(input())
 s2=set(input())
 if(len(s1&s2)):
  print('Yes')
 else:
  print('No')


# cook your dish here
t=int(input())
for _ in range(t):
 a=str(input())
 b=str(input())
 k=0
 for i in a:
  for j in b:
   if(i==j):
    k+=1
 if(k>0):
  print('Yes')
 else:
  print('No')

import sys

#def input():    return sys.stdin.readline().strip()
def iinput():   return int(input())
#def rinput():   return map(int, sys.stdin.readline().strip().split()) 
#def get_list(): return list(map(int, sys.stdin.readline().strip().split())) 

for _ in range(iinput()):
 s1=set(input())
 s2=set(input())
 if(len(s1&s2)):
  print('Yes')
 else:
  print('No')
 
 


# cook your dish here
n=int(input())
for i in range(n):
 a=input()
 b=input()
 c=0
 for i in a:
  if i in b:
   c=1
   print("Yes")
   break
 if c==0:
  print("No")


import sys

#def input():    return sys.stdin.readline().strip()
def iinput():   return int(input())
#def rinput():   return map(int, sys.stdin.readline().strip().split()) 
#def get_list(): return list(map(int, sys.stdin.readline().strip().split())) 

for _ in range(iinput()):
 s1=set(input())
 s2=set(input())
 if(len(s1&s2)):
  print('Yes')
 else:
  print('No')
 
 


for _ in range(int(input())):
 a=set(input())
 b=set(input())
 print('Yes' if len(a&b)>0 else 'No')

def solve(s1,s2):
 for i in s1:
  for j in s2:
   if i==j:
    return "Yes"
 return "No"
t=int(input())
for _ in range(t):
 s1=input()
 s2=input()
 print(solve(s1,s2))

# cook your dish here
def solve(a,b):
 for i in a:
  for j in b:
   if i==j:
    return 1
 return 0
t=int(input())
for _ in range(0,t):
 a=input()
 b=input()
 if(solve(a,b)):
  print("Yes")
 else:
  print("No")

# cook your dish here
t=int(input())

for n in range(t):
 a=str(input())
 b=str(input())
 count = 0
 for i in a:
  for j in b:
   if i==j:
    count+=1
 if count > 0:
  print("Yes")
 else:
  print("No")