A == B ?
#include<iostream>
using namespace std;
#include<string>
int main()
{
string a,b;
while(cin>>a>>b)
{
int i,k = 0;
int sum = a.size();
if(a.size() < b.size())
sum = b.size();
for(i = 0 ; i < sum ; i++)
{
if( a[i] == '.' || b[i] == '.' )
{
k++;
break;
}
if(a[i] == b[i])
k++;
}
for( i=i+1; i < sum ; i++)
{
if(a[i] == b[i] || ( a[i] == NULL && b[i] == '0') || ( b[i] == NULL && a[i] == '0') )
k++;
}
if(k == sum)
cout<< "YES" <<endl;
else
cout<< "NO" <<endl;
}
}