#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

//イテレーション
#define REP(i,n) for(ll i=0;i<ll(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=ll(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=ll(b);i--)
#define FORA(i,I) for(const auto& i:I)
//x:コンテナ
#define ALL(x) x.begin(),x.end()
#define SIZE(x) ll(x.size())
//定数
#define INF32 2147483647 //2.147483647×10^{9}:32bit整数のinf
#define INF64 9223372036854775807 //9.223372036854775807×10^{18}:64bit整数のinf
//#define MOD 1000000007 //問題による
//略記
#define F first
#define S second
//出力(空白区切りで昇順に)
#define coutALL(x) {for(auto i=x.begin();i!=--x.end();i++)cout<<*i<<" ";cout<<*--x.end()<<endl;}

const string YES = "Yes";
const string NO = "No";

void solve(long long M, long long H){
  if (H % M == 0) {
    cout << YES << endl;
  } else {
    cout << NO << endl;
  }
}

signed main(){
  //小数の桁数の出力指定
  cout<<fixed<<setprecision(10);
  //入力の高速化用のコード
  ios::sync_with_stdio(false); // stringの時はコメントアウト
  cin.tie(nullptr);

  long long M;
  scanf("%lld",&M);
  long long H;
  scanf("%lld",&H);
  solve(M, H);
  return 0;
}

//#####   #####   #####   #####   #####   #       #####   #   #//
//#   #   #   #   #       #       #   #   #       #   #   ## ##//
//#####   #####   #####   #       #####   #       #####   # # #//
//##      #   #       #   #       #   #   #       #   #   #   #//
//# #     #   #       #   #       #   #   #       #   #   #   #//
//#  #    #   #       #   #       #   #   #       #   #   #   #//
//#   #   #   #   #####   #####   #   #   #####   #   #   #   #//


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define pbds tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
using namespace std;
#define ll long long
#define pb push_back
#define ppb pop_back
#define cs(n) cout<<n<<" "
#define rep(i,j,k) for(int i=j;i<k;i++)
#define rrep(i,j,k) for(int i=j;i>=k;i--)
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define de2(x) cout << #x << " " << x << endl;
#define rept(it,v) for(auto it=v.begin(); it!=v.end(); it++)
#define sz(v) (int)(v.size())
#define printdec(x,y) cout<< fixed << setprecision(y) << x
#define ff first
#define ss second
#define all(x) x.begin(), x.end()
#define deb(x) cout<<#x<<" : "<<x<<"\n"
#define int long long
template<typename... T>
void read(T&... args) {
	((cin >> args), ...);
}
template<typename... T>
void write(T&&... args) {
	((cout << args << " "), ...);
}
template<typename... T>
void writen(T&&... args) {
	((cout << args << "\n"), ...);
}
template<typename... T>
void cn(T&&... args) {
	((cout << args << " "), ...);
	cout << "\n";
}
ll bin(ll a, ll b, ll mod)
{
	if (b == 0)
		return 1;
	if (b % 2 == 0)
		return bin((a * a) % mod , b / 2 , mod) % mod;
	return ((a % mod) * (bin((a * a) % mod , b / 2 , mod) % mod)) % mod;
}
void solve()
{
	int n;
	read(n);
	int ar[n + 5];
	rep(i, 0, n) {
		read(ar[i]);
	}
	pbds s;
	s.insert(ar[0]);
	int cnt = 0;
	rep(i, 1, n) {
		s.insert(ar[i]);
		int inv = s.order_of_key(ar[i] + 1);
		cnt += sz(s) - inv;
	}
	cout << cnt << "\n";
	rep(i, 0, n - 1) {
		cnt -= ar[i];
		cnt += (n - 1 - ar[i]);
		cout << cnt << "\n";
	}
}
signed main()
{
	fastio;
	int t;
	t = 1;
	// cin >> t;
	while (t--)
	{
		solve();
	}
#ifndef ONLINE_JUDGE
	cout << "\nTime Elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " sec\n";
#endif
	return 0;
}