#include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b,h;
	cin>>a>>b;
	h=a*b;
	if(a==b){	
		cout<<"Y"<<endl<<h;
	}else{
		cout<<"N"<<endl<<h;
	}
}
/**************************************************************
	Problem: 1655
	User: fuhoubin
	Language: C++
	Result: Accepted
	Time:19 ms
	Memory:2072 kb
****************************************************************/