Paula has been reading about communication systems which interests her a lot. There she noticed a peculiar way to measure distance/error between 2 signals called the Hamming Distance. Till now she only knew of Euclidean Distance between 2 points. On searching online, she read the following on Wikipedia:- In information theory, the Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different. In another way, it measures the minimum number of substitutions required to change one string into the other, or the minimum number of errors that could have transformed one string into the other. If the length of strings differ, we consider that the Hamming Distance cannot be found out.
She wants to see if she has understood the concept clearly. So, she decides to write a program that will find the Hamming Distance between 2 signals. Can you help her?
INPUT
First line of the input contains the number of test cases T. T test cases follow. Each test case consists of the 2 strings, each on a separate line.
OUTPUT
For every test case, print the Hamming Distance between the 2 strings. If it doesn't exist, print -1.
CONSTRAINTS
1 <= T <= 1000
1 <= Length of Signals <= 1000
Strings will consist of only alphabets and numerical digits.
Note:- A signal can be represented as a string of characters. Upper case and Lower Case alphabets represent different characters.