stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <iostream>

using namespace std;



int main()

{

    int N;

    cin >> N;

    string S[100000];

    int A = 0, W = 0, T = 0, R = 0;

    for (int i = 0; i < N; i++) {

        cin >> S[i];

    }

    for (int i = 0; i < N; i++) {

        if (S[i] == "AC") {

            A ++;

        }

    }

    for (int i = 0; i < N; i++) {

        if (S[i] == "WA") {

            W ++;

        }

    }

    for (int i = 0; i < N; i++) {

        if (S[i] == "TLE") {

            T ++;

        }

    }

    for (int i = 0; i < N; i++) {

        if (S[i] == "RE") {

            R ++;

        }

    }

    cout << "AC x " << A<<endl;

    cout << "WA x " << W<<endl;

    cout << "TLE x " << T<<endl;

    cout << "RE x " << R <<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 4.368075429436904x):
#include <iostream>

#include <string>

using namespace std;

int main()

{

long long n , a=0 , w=0 , t=0 , r=0;

string ar;

cin>>n;

for(long long i=0 ; i<n ; i++)

{

    cin>>ar;

    if(ar == "AC"){

        a++;

    } else if(ar == "WA"){

        w++;

    }else if(ar == "TLE"){

        t++;

    }else if(ar == "RE"){

        r++;

    }

}

cout<<"AC"<<" "<< "x" <<" "<<a<<endl;

cout<<"WA"<<" "<< "x" <<" "<<w<<endl;

cout<<"TLE"<<" "<< "x" <<" "<<t<<endl;

cout<<"RE"<<" "<< "x" <<" "<<r<<endl;

return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    long long int a,b,j,k;

    cin >> a >> b;

    j=(a*(a-1))/2;

    k=(b*(b-1))/2;

    cout << j+k << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.2649300339188505x):
#include <stdio.h>



int main(){

	int a, b;

	scanf("%d %d", &a, &b);

	a = a * (a - 1) / 2;

	b = b * (b - 1) / 2;

	printf("%d", a + b);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define FLASH ios_base::sync_with_stdio(0);

#define ll long long

#define debt(x,y)cout<<"#x = "<<(x)<<" and "<<"#y = "<<(y)<<endl;

#define deb(x)cout<<"#x = "<<(x)<<endl;

#define pb push_back

#define mp make_pair

#define all(x) (x).begin(), (x).end()

#define endl "\n"

#define arr(a,n) for(ll i=1;i<=n;i++) cout<<a[i]<<" "; cout << "\n";

#define vecc(a,n) for(ll i=0;i<n;i++) cout<<a[i]<<" "; cout << "\n";





using namespace std;



ll a,b;



int main(){

FLASH;

cin>>a>>b;

cout<<a*(a-1)/2+b*(b-1)/2<<endl;















return 0;

} 


// Faster C++ solution for the same problem (measured speedup: 5.339841047444983x):
#include <stdio.h>



int main(){

	int a, b;

	scanf("%d %d", &a, &b);

	a = a * (a - 1) / 2;

	b = b * (b - 1) / 2;

	printf("%d", a + b);

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    int a,b;

    cin>>a>>b;

    cout<<((a*(a-1))/2)+((b*(b-1))/2)<<endl;

return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.268292590714649x):
#include <stdio.h>



int main(){

	int a, b;

	scanf("%d %d", &a, &b);

	a = a * (a - 1) / 2;

	b = b * (b - 1) / 2;

	printf("%d", a + b);

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    long long int a,b,j,k;

    cin >> a >> b;

    j=(a*(a-1))/2;

    k=(b*(b-1))/2;

    cout << j+k << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.255712931326773x):
#include <stdio.h>



int main () {

	int x, y;

	scanf("%d %d", &x, &y);

	printf("%d\n", x*(x-1)/2 + y*(y-1)/2);

	

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define FLASH ios_base::sync_with_stdio(0);

#define ll long long

#define debt(x,y)cout<<"#x = "<<(x)<<" and "<<"#y = "<<(y)<<endl;

#define deb(x)cout<<"#x = "<<(x)<<endl;

#define pb push_back

#define mp make_pair

#define all(x) (x).begin(), (x).end()

#define endl "\n"

#define arr(a,n) for(ll i=1;i<=n;i++) cout<<a[i]<<" "; cout << "\n";

#define vecc(a,n) for(ll i=0;i<n;i++) cout<<a[i]<<" "; cout << "\n";





using namespace std;



ll a,b;



int main(){

FLASH;

cin>>a>>b;

cout<<a*(a-1)/2+b*(b-1)/2<<endl;















return 0;

} 


// Faster C++ solution for the same problem (measured speedup: 5.330492801135421x):
#include <stdio.h>



int main () {

	int x, y;

	scanf("%d %d", &x, &y);

	printf("%d\n", x*(x-1)/2 + y*(y-1)/2);

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    int a,b;

    cin>>a>>b;

    cout<<((a*(a-1))/2)+((b*(b-1))/2)<<endl;

return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.259069601428778x):
#include <stdio.h>



int main () {

	int x, y;

	scanf("%d %d", &x, &y);

	printf("%d\n", x*(x-1)/2 + y*(y-1)/2);

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    long long int a,b,j,k;

    cin >> a >> b;

    j=(a*(a-1))/2;

    k=(b*(b-1))/2;

    cout << j+k << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.264965160831399x):
#include<stdio.h>

int main()

{

    int N, M, hasil1,hasil2 ;

    scanf("%d %d", &N, &M);

    hasil1=(N-1)*(N)/2;

    hasil2=(M-1)*(M)/2;

    printf("%d", hasil1+hasil2);

return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define FLASH ios_base::sync_with_stdio(0);

#define ll long long

#define debt(x,y)cout<<"#x = "<<(x)<<" and "<<"#y = "<<(y)<<endl;

#define deb(x)cout<<"#x = "<<(x)<<endl;

#define pb push_back

#define mp make_pair

#define all(x) (x).begin(), (x).end()

#define endl "\n"

#define arr(a,n) for(ll i=1;i<=n;i++) cout<<a[i]<<" "; cout << "\n";

#define vecc(a,n) for(ll i=0;i<n;i++) cout<<a[i]<<" "; cout << "\n";





using namespace std;



ll a,b;



int main(){

FLASH;

cin>>a>>b;

cout<<a*(a-1)/2+b*(b-1)/2<<endl;















return 0;

} 


// Faster C++ solution for the same problem (measured speedup: 5.339876674153845x):
#include<stdio.h>

int main()

{

    int N, M, hasil1,hasil2 ;

    scanf("%d %d", &N, &M);

    hasil1=(N-1)*(N)/2;

    hasil2=(M-1)*(M)/2;

    printf("%d", hasil1+hasil2);

return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    int a,b;

    cin>>a>>b;

    cout<<((a*(a-1))/2)+((b*(b-1))/2)<<endl;

return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.268327740061729x):
#include<stdio.h>

int main()

{

    int N, M, hasil1,hasil2 ;

    scanf("%d %d", &N, &M);

    hasil1=(N-1)*(N)/2;

    hasil2=(M-1)*(M)/2;

    printf("%d", hasil1+hasil2);

return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    long long int a,b,j,k;

    cin >> a >> b;

    j=(a*(a-1))/2;

    k=(b*(b-1))/2;

    cout << j+k << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.264965160831399x):
#include <stdio.h>



int main(){

 int N,M;

 

 scanf("%d %d",&N, &M);

 printf("%d",(N*(N-1)/2) + (M*(M-1)/2));



 return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define FLASH ios_base::sync_with_stdio(0);

#define ll long long

#define debt(x,y)cout<<"#x = "<<(x)<<" and "<<"#y = "<<(y)<<endl;

#define deb(x)cout<<"#x = "<<(x)<<endl;

#define pb push_back

#define mp make_pair

#define all(x) (x).begin(), (x).end()

#define endl "\n"

#define arr(a,n) for(ll i=1;i<=n;i++) cout<<a[i]<<" "; cout << "\n";

#define vecc(a,n) for(ll i=0;i<n;i++) cout<<a[i]<<" "; cout << "\n";





using namespace std;



ll a,b;



int main(){

FLASH;

cin>>a>>b;

cout<<a*(a-1)/2+b*(b-1)/2<<endl;















return 0;

} 


// Faster C++ solution for the same problem (measured speedup: 5.339876674153845x):
#include <stdio.h>



int main(){

 int N,M;

 

 scanf("%d %d",&N, &M);

 printf("%d",(N*(N-1)/2) + (M*(M-1)/2));



 return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    int a,b;

    cin>>a>>b;

    cout<<((a*(a-1))/2)+((b*(b-1))/2)<<endl;

return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.268327740061729x):
#include <stdio.h>



int main(){

 int N,M;

 

 scanf("%d %d",&N, &M);

 printf("%d",(N*(N-1)/2) + (M*(M-1)/2));



 return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main() {

  int n, m;

  cin >> n >> m;

  cout << n*(n-1)/2+m*(m-1)/2 << endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.268327740061729x):
#include<cstdio>

using namespace std;

int main() {

  int n, m;

  scanf("%d %d",&n,&m);

  printf("%d",n*(n-1)/2+m*(m-1)/2);

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main() {

  int n, m;

  cin >> n >> m;

  cout << n*(n-1)/2+m*(m-1)/2 << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.2687632044759996x):
#include<cstdio>

using namespace std;

int main() {

  int n, m;

  scanf("%d %d",&n,&m);

  printf("%d",n*(n-1)/2+m*(m-1)/2);

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main() {

  int n, m;

  scanf("%d %d",&n,&m);

  printf("%d",n*(n-1)/2+m*(m-1)/2);

}


// Faster C++ solution for the same problem (measured speedup: 5.201819109536223x):
#include<cstdio>

using namespace std;

int main() {

  int n, m;

  scanf("%d %d",&n,&m);

  printf("%d",n*(n-1)/2+m*(m-1)/2);

}
// Slower C++ solution:
#include<iostream>

#include <vector>

using namespace std;

int main()

{

 int n,m;

 cin>>n>>m;

 cout<<n*(n-1)/2+m*(m-1)/2;

}


// Faster C++ solution for the same problem (measured speedup: 5.251278830576691x):
#include<stdio.h>

int main(){

	

	int n,m;

    scanf("%d %d",&n,&m);

    printf("%d\n",n*(n-1)/2+m*(m-1)/2);

	

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

	long long int n,m;

	cin>>n>>m;

	n--;

	m--;

	cout<<(n*(n+1)/2)+(m*(m+1)/2);

}


// Faster C++ solution for the same problem (measured speedup: 5.205700188254473x):
#include<stdio.h>

int main(){

	

	int n,m;

    scanf("%d %d",&n,&m);

    printf("%d\n",n*(n-1)/2+m*(m-1)/2);

	

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

#include <vector>

using namespace std;

int main()

{

 int n,m;

 cin>>n>>m;

 cout<<n*(n-1)/2+m*(m-1)/2;

}


// Faster C++ solution for the same problem (measured speedup: 5.255345987702854x):
#include<stdio.h>

#include<string.h>



// helpful functions

#define fl(i,n) for(long long i = 0; i < n; i++)

#define fls(i,a,b) for(long long i = a; i <= b; i ++)

#define afl(i,a,n) int a[n]; for(int i = 0; i < n; i++) scanf("%d", &ar[i])



// printers

#define iprint(x) printf("%d\n", x)

#define lprint(x) printf("%lld\n", x)

#define fprint(x,n) printf("%.nf\n", x)

#define dprint(x,n) printf("%.nlf\n", x)

#define sprint(x) printf("%s\n", x)



// scanners

#define iscan(x) scanf("%d", &x)

#define lcan(x) scanf("%lld", &x)

#define fscan(x) scanf("%f", &x)

#define dscan(x) scanf("%lf", &x)

#define scan(x) scanf("%s", x)

#define qs(x) long long x; scanf("%lld", &x)



int main()

{

	qs(odd); qs(even);

	iprint(odd*(odd-1)/2 + even*(even-1)/2);

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

	long long int n,m;

	cin>>n>>m;

	n--;

	m--;

	cout<<(n*(n+1)/2)+(m*(m+1)/2);

}


// Faster C++ solution for the same problem (measured speedup: 5.209732044360464x):
#include<stdio.h>

#include<string.h>



// helpful functions

#define fl(i,n) for(long long i = 0; i < n; i++)

#define fls(i,a,b) for(long long i = a; i <= b; i ++)

#define afl(i,a,n) int a[n]; for(int i = 0; i < n; i++) scanf("%d", &ar[i])



// printers

#define iprint(x) printf("%d\n", x)

#define lprint(x) printf("%lld\n", x)

#define fprint(x,n) printf("%.nf\n", x)

#define dprint(x,n) printf("%.nlf\n", x)

#define sprint(x) printf("%s\n", x)



// scanners

#define iscan(x) scanf("%d", &x)

#define lcan(x) scanf("%lld", &x)

#define fscan(x) scanf("%f", &x)

#define dscan(x) scanf("%lf", &x)

#define scan(x) scanf("%s", x)

#define qs(x) long long x; scanf("%lld", &x)



int main()

{

	qs(odd); qs(even);

	iprint(odd*(odd-1)/2 + even*(even-1)/2);

	return 0;

}
// Slower C++ solution:
#include<iostream>

#include <vector>

using namespace std;

int main()

{

 int n,m;

 cin>>n>>m;

 cout<<n*(n-1)/2+m*(m-1)/2;

}


// Faster C++ solution for the same problem (measured speedup: 5.2521866425102255x):
#include <stdio.h>

#include <string.h>

int main()

{

    int n,m;

    scanf("%d%d",&n,&m);

    printf("%d\n",n*(n-1)/2 +m*(m-1)/2);

    return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

	long long int n,m;

	cin>>n>>m;

	n--;

	m--;

	cout<<(n*(n+1)/2)+(m*(m+1)/2);

}


// Faster C++ solution for the same problem (measured speedup: 5.206600120805336x):
#include <stdio.h>

#include <string.h>

int main()

{

    int n,m;

    scanf("%d%d",&n,&m);

    printf("%d\n",n*(n-1)/2 +m*(m-1)/2);

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include <vector>

using namespace std;

int main()

{

 int n,m;

 cin>>n>>m;

 cout<<n*(n-1)/2+m*(m-1)/2;

}


// Faster C++ solution for the same problem (measured speedup: 5.251278830576691x):
# include <stdio.h>

 

int main(){

	int N,M;

	scanf("%d %d",&N,&M);

	printf("%d\n",N*(N-1)/2+M*(M-1)/2);

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

	long long int n,m;

	cin>>n>>m;

	n--;

	m--;

	cout<<(n*(n+1)/2)+(m*(m+1)/2);

}


// Faster C++ solution for the same problem (measured speedup: 5.205700188254473x):
# include <stdio.h>

 

int main(){

	int N,M;

	scanf("%d %d",&N,&M);

	printf("%d\n",N*(N-1)/2+M*(M-1)/2);

	return 0;

}
// Slower C++ solution:
#include<iostream>

#include <vector>

using namespace std;

int main()

{

 int n,m;

 cin>>n>>m;

 cout<<n*(n-1)/2+m*(m-1)/2;

}


// Faster C++ solution for the same problem (measured speedup: 5.260488156952287x):
#include<stdio.h>

int main()

{

	int N;

	int M;

	int total;

	scanf("%d %d",&N,&M);

	N=--N*(N+1)/2;

	M=--M*(M+1)/2;

	total= N + M;

	printf("%d",total);

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

	long long int n,m;

	cin>>n>>m;

	n--;

	m--;

	cout<<(n*(n+1)/2)+(m*(m+1)/2);

}


// Faster C++ solution for the same problem (measured speedup: 5.2148295819876695x):
#include<stdio.h>

int main()

{

	int N;

	int M;

	int total;

	scanf("%d %d",&N,&M);

	N=--N*(N+1)/2;

	M=--M*(M+1)/2;

	total= N + M;

	printf("%d",total);

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

#include <vector>

using namespace std;

int main()

{

 int n,m;

 cin>>n>>m;

 cout<<n*(n-1)/2+m*(m-1)/2;

}


// Faster C++ solution for the same problem (measured speedup: 5.250879644268881x):
#include <stdio.h>



int main(){

int N,M,Bilangan_Genap,Bilangan_Ganjil;

scanf("%d %d", &N,&M);

if (N==1 && M==1) {

printf("0\n");

}

else {

N=N-1;

M=M-1;

Bilangan_Genap=(N*(N+1))/2;

Bilangan_Ganjil=(M*(M+1)/2);

printf("%d\n",Bilangan_Genap+Bilangan_Ganjil);

}

return 0;



}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

	long long int n,m;

	cin>>n>>m;

	n--;

	m--;

	cout<<(n*(n+1)/2)+(m*(m+1)/2);

}


// Faster C++ solution for the same problem (measured speedup: 5.205304466696971x):
#include <stdio.h>



int main(){

int N,M,Bilangan_Genap,Bilangan_Ganjil;

scanf("%d %d", &N,&M);

if (N==1 && M==1) {

printf("0\n");

}

else {

N=N-1;

M=M-1;

Bilangan_Genap=(N*(N+1))/2;

Bilangan_Ganjil=(M*(M+1)/2);

printf("%d\n",Bilangan_Genap+Bilangan_Ganjil);

}

return 0;



}
// Slower C++ solution:
#include<iostream>

#include <vector>

using namespace std;

int main()

{

 int n,m;

 cin>>n>>m;

 cout<<n*(n-1)/2+m*(m-1)/2;

}


// Faster C++ solution for the same problem (measured speedup: 5.260464539673285x):
#include <stdio.h>

int main (){

	int a,b;

	scanf("%d %d",&a,&b);

	printf("%d",(a*a-a)/2+(b*b-b)/2);

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

	long long int n,m;

	cin>>n>>m;

	n--;

	m--;

	cout<<(n*(n+1)/2)+(m*(m+1)/2);

}


// Faster C++ solution for the same problem (measured speedup: 5.214806169695596x):
#include <stdio.h>

int main (){

	int a,b;

	scanf("%d %d",&a,&b);

	printf("%d",(a*a-a)/2+(b*b-b)/2);

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

#include <vector>

using namespace std;

int main()

{

 int n,m;

 cin>>n>>m;

 cout<<n*(n-1)/2+m*(m-1)/2;

}


// Faster C++ solution for the same problem (measured speedup: 5.251840737680808x):
#include <stdio.h>

 

int main() {

    int N, M;

    scanf("%d %d",&N, &M);

    printf("%d\n", N * (N - 1) / 2 + M * (M - 1) / 2);

    return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

	long long int n,m;

	cin>>n>>m;

	n--;

	m--;

	cout<<(n*(n+1)/2)+(m*(m+1)/2);

}


// Faster C++ solution for the same problem (measured speedup: 5.206257218267933x):
#include <stdio.h>

 

int main() {

    int N, M;

    scanf("%d %d",&N, &M);

    printf("%d\n", N * (N - 1) / 2 + M * (M - 1) / 2);

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#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 ALL(x) (x).begin(),(x).end() 

#define SIZE(x) ((ll)(x).size())

#define MAX(x) *max_element(ALL(x))

#define MIN(x) *min_element(ALL(x))

#define INF 1000000000

using namespace std;

typedef long long ll;



const ll M = 998244353;

vector<ll> fac(300001);

vector<ll> ifac(300001);



int Combination(int n, int r){

        int num = 1;

        for(int i = 1; i <= r; i++){

            num = num * (n - i + 1) / i;

        }

        return num;

    }



int main(void)

{

    int N, M;

    cin >> N >> M;

    

    int ans = 0;

    ans += Combination(N, 2);

    ans += Combination(M, 2);





    cout << ans << endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.9866489366429665x):
#include <bits/stdc++.h>

#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 ALL(x) (x).begin(),(x).end() 

#define SIZE(x) ((ll)(x).size())

#define MAX(x) *max_element(ALL(x))

#define MIN(x) *min_element(ALL(x))

#define INF 1000000000

using namespace std;

typedef long long ll;





int comb(int n, int r){

    int num = 1;

    FOR(i, 1, r){

        num = num * (n - i + 1)/i;

    }



    return num; 

}



int main() {

    int N, M;

    cin >> N >> M;



    int ans = comb(N, 2) + comb(M, 2);



    cout << ans << endl;



    return 0;

}
// Slower C++ solution:
/*

 Abu Jafor Mohammad Saleh

 ios_base :: sync_with_stdio(false);

 cin.tie(NULL);

 

 */



#include<cstdio>

#include<iomanip>

#include<sstream>

#include<cstdlib>

#include<cctype>

#include<cmath>

#include<algorithm>

#include<set>

#include<queue>

#include<deque>

#include<stack>

#include<list>

#include<iostream>

#include<fstream>

#include<numeric>

#include<string>

#include<vector>

#include<cstring>

#include<map>

#include<iterator>

#include<limits>

#include <algorithm>

#include <unordered_map>

#include<fstream>

#define f first

#define s second

#define MOD 1000003



#define INF (int)1e9

#define PI 3.1415926535897932384626433832795

#define BOUNDARY(i, j) ((i >= 0 && i < rows) && (j >= 0 && j < coloums))



//#include<bits/stdc++.h>

#define fast ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

#define ll long long

const int maxn = 100001;

using namespace std;

int X[] = {0, 1, 0, -1};

int Y[] = {-1, 0, 1, 0};

int rows,coloums;

long long  gcd(long long  a, long long b)

{

    if (b == 0)

        return a;

    return gcd(b, a % b);

}



int main()

{

    fast;

    ll n,m;

    cin>>n>>m;

    

    ll x = (n*(n-1))/2;

    ll y = (m*(m-1))/2;

    cout<<(x+y)<<endl;

    

}


// Faster C++ solution for the same problem (measured speedup: 5.33572798220324x):
#include <stdio.h>



int main(){

	int even;

	int odd;

	int ans = 0;

	scanf("%d %d", &even, &odd);

	int ans1 = even * (even - 1)/2;

	int ans2 = odd * (odd - 1)/2;

	

	printf("%d", ans1 + ans2);

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;



int main(){

	ios::sync_with_stdio(0);cin.tie(NULL);

	

	int n,m; cin>>n>>m;

	cout<<(n)*(n-1)/2+(m)*(m-1)/2<<endl;

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.339182716595453x):
#include <stdio.h>



int main(){

	int even;

	int odd;

	int ans = 0;

	scanf("%d %d", &even, &odd);

	int ans1 = even * (even - 1)/2;

	int ans2 = odd * (odd - 1)/2;

	

	printf("%d", ans1 + ans2);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long Long;



int main(){

	ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);

	Long n,m;cin>>n>>m; 

	Long resp=0;

	resp=(n*(n-1))/2+((m)*(m-1))/2,

	cout<<resp;

}

// Faster C++ solution for the same problem (measured speedup: 5.331100208508351x):
#include <stdio.h>



int main(){

	int even;

	int odd;

	int ans = 0;

	scanf("%d %d", &even, &odd);

	int ans1 = even * (even - 1)/2;

	int ans2 = odd * (odd - 1)/2;

	

	printf("%d", ans1 + ans2);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



#define ll long long

const int N = 300005;



int n, m , ans;



int main()

{

    cin >> n >> m;

    ans = (n+m)*(n+m-1);

    ans/=2;

    ans-= (n*m);



    cout << ans;



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.260200794560972x):
#include <stdio.h>



int main(){

	int even;

	int odd;

	int ans = 0;

	scanf("%d %d", &even, &odd);

	int ans1 = even * (even - 1)/2;

	int ans2 = odd * (odd - 1)/2;

	

	printf("%d", ans1 + ans2);

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main()

{

int n,a,b,c;

cin>>a>>b;

cout<<((a*(a-1))/2)+((b*(b-1))/2)<<endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.268327740061729x):
#include <stdio.h>



int main(){

	int even;

	int odd;

	int ans = 0;

	scanf("%d %d", &even, &odd);

	int ans1 = even * (even - 1)/2;

	int ans2 = odd * (odd - 1)/2;

	

	printf("%d", ans1 + ans2);

	return 0;

}
// Slower C++ solution:
/*

 Abu Jafor Mohammad Saleh

 ios_base :: sync_with_stdio(false);

 cin.tie(NULL);

 

 */



#include<cstdio>

#include<iomanip>

#include<sstream>

#include<cstdlib>

#include<cctype>

#include<cmath>

#include<algorithm>

#include<set>

#include<queue>

#include<deque>

#include<stack>

#include<list>

#include<iostream>

#include<fstream>

#include<numeric>

#include<string>

#include<vector>

#include<cstring>

#include<map>

#include<iterator>

#include<limits>

#include <algorithm>

#include <unordered_map>

#include<fstream>

#define f first

#define s second

#define MOD 1000003



#define INF (int)1e9

#define PI 3.1415926535897932384626433832795

#define BOUNDARY(i, j) ((i >= 0 && i < rows) && (j >= 0 && j < coloums))



//#include<bits/stdc++.h>

#define fast ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

#define ll long long

const int maxn = 100001;

using namespace std;

int X[] = {0, 1, 0, -1};

int Y[] = {-1, 0, 1, 0};

int rows,coloums;

long long  gcd(long long  a, long long b)

{

    if (b == 0)

        return a;

    return gcd(b, a % b);

}



int main()

{

    fast;

    ll n,m;

    cin>>n>>m;

    

    ll x = (n*(n-1))/2;

    ll y = (m*(m-1))/2;

    cout<<(x+y)<<endl;

    

}


// Faster C++ solution for the same problem (measured speedup: 5.326351399764886x):
#include <stdio.h>

int main(){

    int n,m;

    scanf("%d %d",&n,&m);

    printf("%d\n",n*(n-1)/2+m*(m-1)/2);

}
// Slower C++ solution:
#include<iostream>

using namespace std;



int main(){

	ios::sync_with_stdio(0);cin.tie(NULL);

	

	int n,m; cin>>n>>m;

	cout<<(n)*(n-1)/2+(m)*(m-1)/2<<endl;

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.329800063082648x):
#include <stdio.h>

int main(){

    int n,m;

    scanf("%d %d",&n,&m);

    printf("%d\n",n*(n-1)/2+m*(m-1)/2);

}