#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")

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

ll read(){
	ll a=0,b=1;char c=getchar();
	while(c>'9'||c<'0'){if(c=='-')b=-1;c=getchar();}
	while(c>='0'&&c<='9')a=a*10+c-48,c=getchar();
	return a*b;
}

ll n,m,k,a[300005],b[300005];
char s[300005];

int main(){
	n=read(),m=read();
	if(n<m){
		ll su=0;
		for(int i=0;i<n;i++){
			su+=1000000000-i;
			cout<<1000000000-i<<' ';
		}
		for(int i=0;i<n-1;i++){
			su-=1000000000-i;
			cout<<-1000000000+i<<' ';
		}
		for(int i=1;i<=m-n;i++){
			cout<<-i<<' ';
			su-=i;
		}
		cout<<-su<<'\n';
	}else{
		ll su=0;
		for(int i=0;i<m;i++){
			su-=1000000000-i;
			cout<<-1000000000+i<<' ';
		}
		for(int i=0;i<m-1;i++){
			su+=1000000000-i;
			cout<<1000000000-i<<' ';
		}
		for(int i=1;i<=n-m;i++){
			cout<<i<<' ';
			su+=i;
		}
		cout<<-su<<'\n';
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(ll i=0; i<(n); ++i)
#define rep1(i,n) for(ll i=1; i<=(n); ++i)
#define revrep(i,n) for(ll i=(n)-1; i>=0; --i)
inline constexpr ll Inf = (1ULL << 62) -1;
#define fastio cin.tie(nullptr); ios_base::sync_with_stdio(false);
#define newl '\n'
#define YN(e) ((e)?"Yes":"No")
#define all(a) begin(a),end(a)
#define rall(a) rbegin(a),rend(a)
template <class T> bool updmax(T& a, T b) { if (b > a) { a = b; return true;} return false;}
template <class T> bool updmin(T& a, T b) { if (b < a) { a = b; return true;} return false;}
inline constexpr int Mod = 1000000007;
//inline constexpr int Mod = 998244353;

int main() {
    fastio;
    ll ans=0;
    ll a,b,c,d;
    cin >> a >> b >> c >> d;
  	ans = a*d-b*c;
    cout << ans << endl;
}
