Server Time: Sat Sep 26, 2020 1:10 pm
Welcome ( logout
A - IP Checking
PDF (English) Ranklist
Time Limit: 2 second(s) Memory Limit: 32 MB

An IP address is a 32 bit address formatted in the following way


where a, b, c, d are integers each ranging from 0 to 255. Now you are given two IP addresses, first one in decimal form and second one in binary form, your task is to find if they are same or not.


Input starts with an integer T (≤ 100), denoting the number of test cases.

Each case starts with two lines. First line contains an IP address in decimal form, and second line contains an IP address in binary form. In binary form, each of the four parts contains 8 digits. Assume that the given addresses are valid.


For each case, print the case number and "Yes" if they are same, otherwise print "No".

Sample Input

Output for Sample Input




Case 1: No

Case 2: Yes


Problem Setter: Jane Alam Jan
Developed and Maintained by
Copyright © 2012
LightOJ, Jane Alam Jan