
#include<bits/stdc++.h>
using namespace std;
#define ll long long
bool isPrime(ll n)
{
	//Corner case:
	if(n<=1)
	return false;
	if(n<=3)
	return true;

	//This optimizes the complexity:
	if(n%2==0||n%3==0)
	return false;
	for(ll i=5;i*i<=n;i=i+6)
	{
		if(n%i==0||n%(i+2)==0)
		return false;
	}
	return true;
}
int main()
{
	ll n,m;
	cin>>n>>m;
	ll a[n],b[m];
	for(ll i=0;i<n;i++)cin>>a[i];
	for(ll i=0;i<m;i++)cin>>b[i];
	sort(a,a+n);
	sort(b,b+m);
	ll i=0,j=0;
	while(i<n&&j<m)
	{
		if(a[i]>b[j])
		{
			cout<<b[j]<<" ";
			j++;
		}
		else if(a[i]<b[j])
		{
			cout<<a[i]<<" ";
			i++;
		}
		else
		{
			i++;
			j++;
		}
	}
	while(i<n)
	cout<<a[i++]<<" ";
	while(j<m)
	cout<<b[j++]<<" ";
	cout<<endl;
}
	


#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define FAST  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
#define int long long 
//#define ll int
#define all(a) a.begin(),a.end()
#define rev(a) a.rbegin(),a.rend()	
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; //less_equal for multiset
#define ar array
#define pb push_back
#define fi(a,b) for(int i=a;i<(b);i++)
#define fj(a,b) for(int j=a;j<(b);j++)
#define fk(a,b) for(int k=a;k<(b);k++)
const double pi=acosl(-1);



void solve()
{
	int s,p;
	cin>>s>>p;
	for(int i=1;i*i<=p;i++)
	{
		if(p%i==0)
		{
			if(i+p/i==s)
			{
				cout<<"Yes\n";
				return ;
			}
		}
	}
	cout<<"No\n";

	
	
	
	
	
	
	
	
	
	
	
	

	
	
	
	
}



signed main()
{
	FAST;
	//seive();
	int tt=1;
	// cin>>tt;
	while(tt--)
	{
		solve();
	}
}
	
