babadeleida12

chl2023 2023-11-18 11:27:24

//amaze amaze haze
#include<bits/stdc++.h> 
using namespace std; 
int n,m,z;
bool vis[1001][1001],ok; 
void dfs(int x,int y)
{ 
	if(x+y==z){ok=1;return;} 
	if(vis[x][y]==1)return;
	vis[x][y]=1;
	dfs(n,y);
	dfs(0,y);
	dfs(x,m);
	dfs(x,0);
	int sum=min(x,m-y);
	dfs(x-sum,y+sum);
	sum=min(n-x,y);
	dfs(x+sum,y-sum);
}
int main(){ 
	cin>>n>>m>>z; 
	dfs(0,0);
	if(ok) cout<<"Yes";
	else cout<<"No";
	return 0; 
}