#![allow(non_snake_case)]
use std::io::{stdin, Read};
use std::str::FromStr;
fn read_option<T: FromStr>() -> Option<T> {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok()
}
fn read<T: FromStr>() -> T {
    let opt = read_option();
    opt.expect("failed to parse token")
}

fn main() {
    use std::collections::HashMap;
    let mut map: HashMap<usize, usize> = HashMap::new();
    let N: usize = read();
    for i in 1..=N {
        let v: usize = read();
        map.insert(i, v);
    }
    let mut now = 1;
    let mut ans = 0;
    while let Some(v) = map.get(&now) {
        ans += 1;
        if *v == 2 {
            println!("{}", ans);
            return;
        } else if *v == 1 {
            break;
        }
        now = *v;
    }
    println!("{}", -1);
}


use std::io::*;

fn main() {
    let mut s: String = String::new();
    std::io::stdin().read_to_string(&mut s).ok();
    let mut itr = s.trim().split_whitespace();
    let n: usize = itr.next().unwrap().parse().unwrap();
    let a: Vec<usize> = (0..n)
        .map(|_| itr.next().unwrap().parse().unwrap())
        .collect();
    let mut now = 0;
    let mut cnt = 0;
    for i in 0..n {
        if now == i {
            now = a[i] - 1;
            cnt += 1;
        }
        if now == 1 {
            println!("{}", cnt);
            return;
        }
    }
    println!("-1");
}


func readInt() -> Int {
    return Int(readLine()!)!
}

func mainB() {
    let n = readInt()
    let bottoms = (0..<n).map { _ in readInt() }

    var flashBotton = 1
    var count = 0
    while true {
        count += 1
        flashBotton = bottoms[flashBotton - 1]
        if flashBotton == 2 {
            print(count)
            return
        }

        if count > 2 * n {
            print(-1)
            return
        }
    }
}

mainB()


import Foundation

let n = Int(readLine()!)!
var ai: [Int] = []
var ans = 0
var index = 0
for _ in 0..<n {
  ai.append(Int(readLine()!)!)
}
while true {
  ans += 1
  if ans > n || ai[index] == 2 {
    break
  }
  index = ai[index] - 1
}
print(ans > n ? -1 : ans)


import Foundation

#if swift(>=4.0)
extension String {
    func split(by separator: String) -> [String] {
        return self.components(separatedBy: separator)
    }
    func toArray() -> [String] {
        return self.map{String($0)}
    }
}
func exponentiate(_ lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#else
extension String {
    func split(by separator: String) -> [String] {
        return self.componentsSeparatedByString(separator)
    }
    var count: Int {
        return self.characters.count
    }
    func toArray() -> [String] {
        return self.characters.map{String($0)}
    }
    func uppercased() -> String {
        return self.uppercaseString
    }
    func lowercased() -> String {
        return self.lowercaseString
    }
}
//extension Array where Element == String {
//    func joined(separator separator: String) -> String {
//        return self.joinWithSeparator(separator)
//    }
//}
extension Array where Element: Comparable {
    func max() -> Element {
        return self.maxElement()!
    }
    func min() -> Element {
        return self.minElement()!
    }
    func sorted() -> Array {
        return self.sort()
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func sort() {
        self.sortInPlace()
    }
}
extension Array {
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
func exponentiate(lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: String) -> [String] {
    return readLine()!.split(by: separator)
}
func readIntSplit(by separator: String) -> [Int] {
    return readLine()!.split(by: separator).map{Int($0)!}
}

/*************** テストスペース ***************/

/*************** メインプログラム ***************/

let N = readInt()!
var button = [Int]()
for _ in 0..<N {
    button += [readInt()!]
}
var i = 1
for ans in 1...N {
    i = button[i-1]
    if i == 2 {
        print(ans)
        break
    }
    if ans == N {
        print(-1)
    }
}


func readInt() -> Int {
    return Int(readLine()!)!
}

func mainB() {
    let n = readInt()
    let bottoms = (0..<n).map { _ in readInt() }

    var flashBotton = 1
    var count = 0
    while true {
        count += 1
        flashBotton = bottoms[flashBotton - 1]
        if flashBotton == 2 {
            print(count)
            return
        }

        if count > n * n {
            print(-1)
            return
        }
    }
}

mainB()


func readInt() -> Int {
    return Int(readLine()!)!
}

func mainB() {
    let n = readInt()
    let bottoms = (0..<n).map { _ in readInt() }

    var flashBotton = 1
    var count = 0
    while true {
        count += 1
        flashBotton = bottoms[flashBotton - 1]
        if flashBotton == 2 {
            print(count)
            return
        }

        if count > n * n * n {
            print(-1)
            return
        }
    }
}

mainB()


func readInt() -> Int {
    return Int(readLine()!)!
}

func mainB() {
    let n = readInt()
    let bottoms = (0..<n).map { _ in readInt() }

    var flashBotton = 1
    var count = 0
    while true {
        count += 1
        flashBotton = bottoms[flashBotton - 1]
        if flashBotton == 2 {
            print(count)
            return
        }

        if count > n * n * n {
            print(-1)
            return
        }
    }
}


const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);let input_i=-1;const tn=():number=>{input_i++;return Number(input[input_i])};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{input_i++;return String(input[input_i])};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const asc=(ar:number[])=>{const t=[...ar];return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{const t=[...ar];return t.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length-1;i+=2){if(eval(a+op+arr[i])){return arr[i+1]}}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const deduplicate=(a:any[]):any[]=>{return Array.from(new Set(a))}
const main=()=>{
  let n=tn()
  let nr=tnn(n)
  let j=false;
  let i=0
  let cnt=0
  let check=new Array(n)
  check.fill(false)
  while(!j){
    if(i==1){
      to(cnt)
      return
    }
    if(check[i]==true||i==nr[i]-1){
      to(-1)
      return
    }
    check[i]=true
    i=nr[i]-1
    cnt++;
  }
}
main()


import * as fs from "fs";

const [line1, ...linesA] = fs.readFileSync("/dev/stdin", "utf8").split("\n");
let N = Number(line1)

let B: number[] = linesA.slice(0, N).map((n) => {return Number(n)-1});
let visited: boolean[] = Array(N).fill(false);

let position = 0;
let steps = 0;

while (position != 1 && visited[position] == false) {
	visited[position] = true;
	position = B[position];
	steps += 1;
}

if (position == 1)
	console.log(steps);
else
	console.log(-1);


{
  const run = (input: string) => {
    const list = input.trim().split("\n").map(v => parseInt(v))
    let index = 1
    const used = {}
    while (true) {
      index = list[index]
      if (index === 2) {
        return Object.keys(used).length + 1
      }

      if (used[index] === 1) {
        return -1;
      }
      used[index] = 1
    }
  }

  const Main = (input: string) => {
    console.log(run(input))
  };

  Main(require("fs").readFileSync("/dev/stdin", "utf8"));
}


{
  const run = (input: string) => {
    const list = input.trim().split("\n").map(v => parseInt(v))
    let index = 1
    let count = 0
    const used = []
    while (true) {
      count++
      index = list[index]
      if (index === 2) {
        return count
      }
      if (used.indexOf(index) >= 0) {
        return -1;
      }
      used.push(index)
    }
  }

  const Main = (input: string) => {
    console.log(run(input))
  };

  Main(require("fs").readFileSync("/dev/stdin", "utf8"));
}


import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const buttons = input.slice(1, -1).map((line) => Number(line[0]));

  let count = 1;
  let next = buttons[0];

  buttons[0] = -1;

  while (true) {
    const button = buttons[next - 1];
    buttons[next - 1] = -1;

    count += 1;

    if (button === -1) {
      return -1;
    }

    if (button === 2) {
      break;
    }

    next = button;
  }

  return count;
};

console.log(main(read()));


import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const buttons = input.slice(1, -1).map((line) => Number(line[0]));

  let count = 1;
  let next = buttons[0];

  while (true) {
    const label = buttons[next - 1];
    buttons[next - 1] = -1;

    next = label;
    count += 1;

    if (next === -1) {
      return -1;
    }

    if (next === 2) {
      break;
    }
  }

  return count;
};

console.log(main(read()));


n,m,k=map(int,input().split())
n,m=min(n,m),max(n,m)
for i in range(n//2+n%2):
  num,dem=k-i*m,n-2*i
  if num%dem or not(0<=num//dem<=m):continue
  print("Yes");exit()
print("No")


N , M , K = input().split()
N = int(N)
M = int(M)
K = int(K)
OK = False

for n in range(N + 1):
    if N == 2*n :
        if K == N*M / 2 : OK = True
    else :
        flag =  (K - M * n) % (N - 2*n) == 0
        if(flag):
            m = (K - M * n) / (N - 2*n)
            if( (m >= 0) & (m <= M) ) :
                OK = True

if(OK) : print("Yes")
else : print("No")


nmk = input().split()
n = int(nmk[0])
m = int(nmk[1])
k = int(nmk[2])

message = "No"
for i in range(m):
    x = int(i)
    if m-2*x == 0:
        y=-1
    else:
        y = (-n*x+k)/(m-2*x)
#         print(y)
    if y >= 0 and y <= n and y%1 == 0:
        message="Yes"
        break

print(message)


H, W, K = map(int, input().split())
for h in range(0, H+1):
  for w in range(0, W+1):
    if h*W + w*H - h*w == K:
      print('Yes')
      exit()
print('No')


H, W = map(int, input().split())
for h in range(0, H+1):
  for w in range(0, W+1):
    if h*W + w*H - h*w == K:
      print('Yes')
      exit()
print('No')


n, m, k = map(int, input().split())

for i in range(n):
  for j in range(m):
    a = m*i + n*j - 2*i*j
    if a == k:
      print('Yes')
      exit()
print('No')


import java.io.*;
import java.util.*;

public class Main {
    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] ips = br.readLine().split(" ");
        int n = Integer.parseInt(ips[0]);
        int m = Integer.parseInt(ips[1]);
        int k = Integer.parseInt(ips[2]);
        for(int i = 0; i <= n; ++i){
            int num = (k-m*i);
            int den = (n-2*i);
            if(den==0)
                continue;
            if(num%den == 0 && num/den <= m && num/den >= 0){
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");
    }
}


import java.io.IOException;
import java.io.InputStream;
import java.util.*;

public class Main {
	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		int n = sc.nextInt();
		int m = sc.nextInt();
		int k = sc.nextInt();
		for (int i = 0; i <= n; i++) {
			for (int j = 0; j <= m; j++) {
				if (n * j + m * i - 2 * i * j == k) {
					System.out.println("Yes");
					return;
				}
			}
		}
		System.out.println("No");
	}
}

class FastScanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;
	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) {
				return false;
			}
		}
		return true;
	}
	private int readByte() {
		if (hasNextByte()) {
			return buffer[ptr++];
		} else {
			return -1;
		}
	}
	private static boolean isPrintableChar(int c) {
		return 33 <= c && c <= 126;
	}
	public boolean hasNext() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr])) {
			ptr++;
		}
		return hasNextByte();
	}
	public String next() {
		if (!hasNext()) {
			throw new NoSuchElementException();
		}
		StringBuilder sb = new StringBuilder();
		int b = readByte();
		while (isPrintableChar(b)) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}
	public long nextLong() {
		if (!hasNext()) {
			throw new NoSuchElementException();
		}
		long n = 0;
		boolean minus = false;
		int b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b) {
			throw new NumberFormatException();
		}
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b)) {
				return minus ? -n : n;
			} else {
				throw new NumberFormatException();
			}
			b = readByte();
		}
	}
	public int nextInt() {
		long nl = nextLong();
		if (nl < Integer.MIN_VALUE || Integer.MAX_VALUE < nl) {
			throw new NumberFormatException();
		}
		return (int) nl;
	}
	public double nextDouble() {
		return Double.parseDouble(next());
	}
}


import java.io.*;
import java.util.*;

class Main{

    public void solve(){
        int n = ni();
        int m = ni();
        int k = ni();

        for(int i = 0; i <= n; i++){
            for(int j = 0; j <= m; j++){
                int sum = (m - j) * i + (n - i) * j;
                if(sum == k){
                    System.out.println("Yes");
                    return;
                }
            }
        }

        System.out.println("No");

    }

    public static void main(String[] args){
        new Main().solve();
    }

   private FastScanner scan = new FastScanner();
   private final int MOD = 1_000_000_007;
   private final int INF = 2147483647;
   private final long LINF = 9223372036854775807L;

    // Scanner
    int ni(){ return scan.nextInt();}
    int[] ni(int n){int[] a = new int[n]; for(int i = 0; i < n; i++){a[i] = ni();} return a;}
    int[][] ni(int y, int x){int[][] a = new int[y][x];
        for(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ni();}} return a;}
    long nl(){return scan.nextLong();}
    long[] nl(int n){long[] a = new long[n]; for(int i = 0; i < n; i++){a[i] = nl();} return a;}
    long[][] nl(int y, int x){long[][] a = new long[y][x];
        for(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = nl();}} return a;}
    String ns(){return scan.next();}
    String[] ns(int n){String[] a = new String[n]; for(int i = 0; i < n; i++){a[i] = ns();} return a;}
    String[][] ns(int y, int x){String[][] a = new String[y][x];
        for(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ns();}} return a;}

    // Math
    int max(int a, int b){return Math.max(a, b);}
    long max(long a, long b){return Math.max(a, b);}
    double max(double a, double b){return Math.max(a, b);}
    int max(int[] a){int max = a[0]; for(int value:a){max = max(max,value);} return max;}
    long max(long[] a){long max = a[0]; for(long value:a){max = max(max,value);} return max;}
    double max(double[] a){double max = a[0]; for(double value:a){max = max(max,value);} return max;}
    int min(int a, int b){return Math.min(a, b);}
    long min(long a, long b){return Math.min(a, b);}
    double min(double a, double b){return Math.min(a, b);}
    int min(int[] a){int min = a[0]; for(int value:a){min = min(min,value);} return min;}
    long min(long[] a){long min = a[0]; for(long value:a){min = min(min,value);} return min;}
    double min(double[] a){double min = a[0]; for(double value:a){min = min(min,value);} return min;}
    long sum(int[] a){long sum = 0; for(int value:a){sum += value;} return sum;}
    long sum(long[] a){long sum = 0; for(long value:a){sum += value;} return sum;}
    double sum(double[] a){double sum = 0; for(double value:a){sum += value;} return sum;}
    int gcd(int a, int b){return b == 0 ? a : gcd(b, a % b);}
    long gcd(long a, long b){return b == 0 ? a : gcd(b, a % b);}
    int lcm(int a, int b){return a / gcd(a, b) * b;}
    long lcm(long a, long b){return a / gcd(a, b) * b;}
    long fact(int n){ if(n == 0){ return 1; } long a = n; for(long i = n - 1; i >= 2; i--){ a *= i; } return a; }
    long fact(long n){ if(n == 0){ return 1; } long a = n; for(long i = n - 1; i >= 2; i--){ a *= i; } return a; }
    long ncr(int n, int r){
        long a = 1;
        for(int i = n; i > n - r; i--){
            a *= i;
        }
        long b = fact(r);
        return a / b;
    }
    long ncr(long n, long r){
        long a = 1;
        for(long i = n; i > n - r; i--){
            a *= i;
        }
        long b = fact(r);
        return a / b;
    }
    long npr(int n, int r){
        long a = 1;
        for(int i = n; i > n - r; i--){
            a *= i;
        }
        return a;
    }
    long npr(long n, long r){
        long a = 1;
        for(long i = n; i > n - r; i--){
            a *= i;
        }
        return a;
    }

    // Array
    void sort(int[] a){ Arrays.sort(a);}
    void sort(long[] a){ Arrays.sort(a);}
    void sort(double[] a){ Arrays.sort(a);}
    void sort(String[] a){ Arrays.sort(a);}
    int[] reverse(int[] a){
        int[] reversed = new int[a.length];
        for(int i = 0; i < a.length; i++){
            reversed[a.length - i - 1] = a[i];
        }
        return reversed;
    }
    long[] reverse(long[] a){
        long[] reversed = new long[a.length];
        for(int i = 0; i < a.length; i++){
            reversed[a.length - i - 1] = a[i];
        }
        return reversed;
    }
    double[] reverse(double[] a){
        double[] reversed = new double[a.length];
        for(int i = 0; i < a.length; i++){
            reversed[a.length - i - 1] = a[i];
        }
        return reversed;
    }
    char[] reverse(char[] a){
        char[] reversed = new char[a.length];
        for(int i = 0; i < a.length; i++){
            reversed[a.length - i - 1] = a[i];
        }
        return reversed;
    }
    String[] reverse(String[] a){
        String[] reversed = new String[a.length];
        for(int i = 0; i < a.length; i++){
            reversed[a.length - i - 1] = a[i];
        }
        return reversed;
    }
    boolean[] reverse(boolean[] a){
        boolean[] reversed = new boolean[a.length];
        for(int i = 0; i < a.length; i++){
            reversed[a.length - i - 1] = a[i];
        }
        return reversed;
    }
    void fill(int[] array, int x) { Arrays.fill(array, x); }
    void fill(long[] array, long x) { Arrays.fill(array, x); }
    void fill(double[] array, double x) { Arrays.fill(array, x); }
    void fill(boolean[] array, boolean x) { Arrays.fill(array, x); }
    void fill(int[][] array, int x) { for(int a[] : array) { fill(a, x); } }
    void fill(long[][] array, long x) { for(long a[] : array) { fill(a, x); } }
    void fill(double[][] array, double x) { for(double a[] : array) { fill(a, x); } }
    void fill(boolean[][] array, boolean x) { for(boolean a[] : array) { fill(a, x); } }

}

class Permutation {
    private int number;
    private int listSize;
    private int searched;
    private int nextIndex;
    private int[][] permList;

    Permutation(int num) {
        this.number = num;
        this.listSize  = this.fact(this.number);
        this.searched   = 0;
        this.nextIndex = 0;
        this.permList  = new int[this.listSize][this.number];

        this.create(0, new int[this.number], new boolean[this.number]);
    }

    int[] nextPerm() {
        return permList[this.nextIndex++];
    }

    boolean isNext() {
        if(this.nextIndex < this.listSize) {
            return true;
        } else {
            this.nextIndex = 0;
            return false;
        }
    }

    int fact(int n){
        return n == 0 ? 1 : n * fact(n-1);
    }

    void create(int num, int[] list, boolean[] flag) {
        if(num == this.number) {
            copyArray(list, permList[this.searched]);
            this.searched++;
        }
        for(int i = 0; i < this.number; i++){
            if(flag[i]) continue;
            list[num] = i;
            flag[i] = true;
            this.create(num+1, list, flag);
            flag[i] = false;

        }
    }

    void copyArray(int[] from, int[] to) {
        for(int i=0; i<from.length; i++) to[i] = from[i];
    }

    void printNum(int[] nums) {
        for(int n : nums) System.out.print(n);
        System.out.println();
    }
}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() { return Double.parseDouble(next());}
}


import java.util.Scanner;

public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){

			int N = scan.nextInt();
			int M = scan.nextInt();
			int K = scan.nextInt();

			int goukei = 0;
			int ok = 0;
			for(int i = 1;i<=N;i++) {
				for(int j = 1;j<=M;j++) {
					goukei =  i*M+j*N-2*i*j;
					if(goukei==K) {
						ok=1;break;
					}
				}
			}

			if(ok==1)System.out.println("Yes");
			else System.out.println("No");

		}

	}

}


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.NoSuchElementException;

public class Main {
	public static void main(String[] args) {

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

			slover();
			out.flush();
		}
	}
	static FastScanner sc = new FastScanner();
	static PrintWriter out = new PrintWriter(System.out);

		private static class D{

			ArrayList<Integer> X=new ArrayList<Integer>();
			ArrayList<Integer> Y=new ArrayList<Integer>();
			int t=0;
			int index=0;
			D(ArrayList<Integer> X,ArrayList<Integer> Y,int t,int index){
				this.X=X;;
				this.Y=Y;
				this.t=t;
				this.index=index;
			}

		}

	//Set<Long> a=new HashSet<Long>();

	//Integer.toBinaryString(i);
	//Integer.toString(i, 2);
//	//Integer.parseInt(bin, 2);
	//bitset
		//StringBuffer S = new StringBuffer(sc.next());
				//String hoge2 = str.reverse().toString();
				//map.containsKey(A)
				//Map<Integer, Integer> map = new HashMap<Integer, Integer>(N);
				/*for ( キーのデータ型 key : マップの名前.keySet() ) {
					データのデータ型 data = マップの名前.get( key );

					// keyやdataを使った処理;
				}*/
				//int i = Integer.parseInt(s);
				//Queue<String> qq=new ArrayDeque<>(); //add,poll,peek BFSは前から実行される
				//Deque<String> dd=new ArrayDeque<>();//push後ろに入れる,poll(pop)後ろからとる,peek addは先頭に入るからバグ注意
				//stackdfsは後ろから実行される
				//ArrayList<Integer> cc = new ArrayList<>(N);
				//cc.contains(tmp)
				//Arrays.asList(c).contains("a")
				//list.set(1,"walk");//1 1 2 3 5
				//PriorityQueue<Integer> r=new PriorityQueue<Integer>();//add poll

		public static class Pair<K, V> extends AbstractMap.SimpleEntry<K, V> implements Comparable<Pair<K, V>> {
			/** serialVersionUID. */
		    private static final long serialVersionUID = 6411527075103472113L;

		    public Pair(final K key, final V value) {
		        super(key, value);
		    }

			@Override
			public int compareTo(Pair<K, V> o) {

				Comparable key = (Comparable)this.getKey();
				Comparable key2 = (Comparable)o.getKey();

				return key.compareTo(key2);
			}

		}

		// 文字列として入力を取得

	private static long mod=1000000009;
	private static int INF =999999999;
	private static long LINF=4000000000000000000L;

	private static long ncr(long n,long r) {
		long res=1;

		for(int i=0;i<r;i++) {
			res*=n-i;
			res/=i+1;
		}
		return res;
	}

	private static int slover()   {
		int N=sc.nextInt(),M=sc.nextInt(),K=sc.nextInt();
		for(int n=0;n<=N;n++) {
			for(int m=0;m<=M;m++) {
				if(n*N+m*M-n*m*2==K) {
					p("Yes");return 0;
				}
			}
		}p("No");
		return 0;
	}
	private static void shape(int Q[]) {
		for(int i=0;i<Q.length;i++) {
			find2(Q,i);
		}
	}
	private static int find2(int Q[],int a) {
		//aの根をbの根にする。
		if(Q[a]==a) {
			return Q[a];
		}else {
			return Q[a]=find2(Q,Q[a]);
		}

	}
	private static void union2(int Q[],int a,int b) {

		int root1=find2(Q,a);
		int root2=find2(Q,b);
		Q[root1]=Q[root2];
	}

	private static void set_add(int Q[],int index,int value) {
		if(Q[index]==value) {

		}
		else if(Q[index]==INF) {
			Q[index]=value;

		}else if(value<Q[index]) {
			set_add(Q,index*2+1,value);
		}else {
			set_add(Q,index*2+2,value);
		}
	}

	private static void priority_queue_add(int Queue[],int index,int value) {
		Queue[index]=value;

		if(index!=0) {
			if((index-1)/2>=0&&Queue[(index-1)/2]>value) {
				Queue[index]=Queue[(index-1)/2];
				priority_queue_add(Queue,(index-1)/2,value);

			}
			if((index-2)/2>=0&&Queue[(index-2)/2]>value) {
				Queue[index]=Queue[(index-2)/2];
				priority_queue_add(Queue,(index-2)/2,value);

			}
		}

	}
private static int priority_queue_getFirst(int[] Queue) {
		int res=Queue[0];
		Queue[0]=Queue[Queue.length-1];
		Queue[Queue.length-1]=INF;
		//System.out.println(Arrays.toString(Queue));
		//大きさのチェック
		Q_shape(Queue,0);

		return res;
	}
	private static void Q_shape(int[] Queue,int index) {

			if(index*2+1<Queue.length&&Queue[index*2+1]<Queue[index]) {
				int v=Queue[index];
				Queue[index]=Queue[index*2+1];
				Queue[index*2+1]=v;
				Q_shape(Queue,index*2+1);

			}
			if(index*2+2<Queue.length&&Queue[index*2+2]<Queue[index]) {
				int v=Queue[index];
				Queue[index]=Queue[index*2+2];
				Queue[index*2+2]=v;
				Q_shape(Queue,index*2+2);

			}

	}
	private static int union_MaxSize(int[] tree) {

		union_shape(tree);

		int V[]=new int[tree.length+1];

		for(int i=0;i<tree.length;i++) {
			V[tree[i]]++;
		}
		int max=0;
		for(int i=0;i<=tree.length;i++) {
			max=Math.max(max, V[i]);
		}
		return max;
	}

	public static int find(int[] tree,int idx) {
        if(tree[idx]==idx) return idx;
        else {

        	return tree[idx] = find(tree,tree[idx]);
        }
    }
	public static void union_shape(int[] tree) {
		for(int i=0;i<tree.length;i++) {
			find(tree,i);
		}
	}

    //union idx2 tree to idx1 tree O(a(N))
    public static int[] union(int tree[],int idx1,int idx2) {
        int root1 = find(tree,idx1);
        int root2 = find(tree,idx2);
        tree[root2] = root1;
        return tree;
    }
	private static boolean heihou(long T) {
		if(Math.pow((int)Math.sqrt(T), 2)==T)return true;
		return false;
	}
	private static String zeroume(String S) {
		while(S.length()<6)S='0'+S;
		return S;
	}

	//速度が足りないときは、前計算を1回だけにしたり、longをintに変えたりするといい
	private static long modNcR2(int n,int r) {
		long x_b=1;

		for(int i=0;i<r;i++) {
			x_b*=(n-i);
			x_b%=mod;
		}

		long y=1;
		for(int i=1;i<=r;i++) {
			y*=i;
			y%=mod;
			//nPrにr!%modの逆元を掛ける
		}
		return  (x_b*modPow((int) y,mod-2,mod)%mod);

	}

	private static long modPow(int i,long t,long mod) {
		//iのt乗をO(log t)で返す
		i%=mod;
		t%=mod;
		long a=i;
		long res=1;
		//for(int i=0;i<S.length();i++) {if(S.charAt(N-i)=='1') {res=res*a%mod;}
		//tをStringで受け取りたい時用
		while(t!=0) {
			if((1&t)==1) {
				res=res*a%mod;
			}
			a=a*a%mod;
			t=t>>1;
		}
		return res;
	}

	public static long gcd(long num1,long num2) {
        if(num2==0) return num1;
        else return gcd(num2,num1%num2);
    }
	public static long lcm(long num1,long num2) {
		return num1*num2/gcd(num1,num2);
	}
	//O(N^0.5)
	private static boolean isPrime(long t) {
		if(t<2)return false;
		for(int i=2;i*i<=t;i++) {
			if(t%i==0)return false;
		}
		return true;
	}
	private static ArrayList<Long> Divisors(long t) {
		ArrayList<Long> c=new ArrayList<Long>();

		for(long i=1;i*i<=t;i++) {
			if(t%i==0) {

				if(i*i!=t) {
					c.add(t/i);
				}
				c.add((long)i);
			}
		}
		return c;
	}
	private static ArrayList<Long> Sorted_Divisors(long t) {
		ArrayList<Long> c=new ArrayList<Long>();
		for(long i=2;i*i<=t;i++) {

			if(t%i==0) {
				p(t+" "+i);
				c.add((long)i);
				t/=i;
				i--;
			}
		}
		if(t!=1)c.add(t);
		Collections.sort(c);

		return c;
	}
	private static void bubunwa() {
		int N=sc.nextInt();
		int K=sc.nextInt();
		int a[]=sc.nextIntArray(N, false);

		boolean dp[] =new boolean[K+1];

		Arrays.fill(dp, false);
		dp[0]=true;
		for(int i=0;i<N;i++) {
			for(int x=K-a[i];x>=0;x--) {
				if(dp[x])dp[x+a[i]]=true;
			}
		}

		p(dp[K] ? "Yes":"No");
	}

	private static String bitToString(int i) {
		return Integer.toBinaryString(i);
	}
/*********************************************************************/
	//target以下までの値のindexを返す
	//target以上が欲しいときは返り値+1すればいい
	//0-indexで個数を求めるときはさらにindex+1する必要あり
	private static int lower_bound(long a[],long target) {
	//p(target+ " "+Arrays.toString(a));
	if(a[0]>target)return -1;
	//最後の値がtarget以下であるときは最後のindexを返す。
	//target以上が欲しいときは注意する必要あり
	if(a[a.length-1]<=target) return a.length-1;

	int S=-1;
	int E=a.length;

	while(S<E) {

		int G=(S+E)/2;
		if(G+1==a.length) {
			G--;
		}
		//未満にしたいときは=の場所を変える
		if(a[G]<=target&&a[G+1]>target) {
			return G;

		}else if(a[G]<=target){
			S=G;
		}else if(a[G]>target) {
			E=G;
		}

	}

	return -1;
	}
	static String nextPermutation(String s) {
		ArrayList<Character> list=new ArrayList<Character>();
		for(int i=0;i<s.length();i++) {
			list.add(s.charAt(i));
		}
		int pivotPos=-1;
		char pivot=0;
		for(int i=list.size()-2;i>=0;i--) {
			if(list.get(i)<list.get(i+1)) {
				pivotPos=i;
				pivot=list.get(i);
				break;
			}
		}
		if(pivotPos==-1&&pivot==0) {
			return "Final";
		}
		int L=pivotPos+1,R=list.size()-1;

		int minPos=-1;
		char min =Character.MAX_VALUE;

		for(int i=R;i>=L;i--) {
			if(pivot<list.get(i)) {
				if(list.get(i)<min) {
					min=list.get(i);
					minPos=i;
				}
			}
		}

		Collections.swap(list, pivotPos, minPos);
		Collections.sort(list.subList(L, R+1));

		StringBuilder sb=new StringBuilder();
		for(int i=0;i<list.size();i++) {
			sb.append(list.get(i));
		}
		return sb.toString();
	}
private static long[][] com;
private static void nCr() {
	int MAX = 3001;
	com= new long[MAX][MAX];
	for(int i = 0; i < MAX; i++)
	    com[i][0] = 1;
	for(int i = 1; i < MAX; i++) {
	    for(int j = 1; j <= i; j++) {
	        com[i][j] = com[i-1][j-1] + com[i-1][j];
	        com[i][j] %= mod;
	    }
	}
}

	static void p(String ans) {out.println(ans);}
	static void p(int ans) {out.println(ans);}
	static void p() {out.println();}
	static void p(long ans) {out.println(ans);}
	static void p(double ans) {out.println(ans);}
	static void p(boolean ans) {out.println(ans);}

	static void pn(String ans) {out.print(ans);};
	static void pn(int ans) {out.print(ans);};
	static void pn() {out.print("");};
	static void pn(long ans) {out.print(ans);};
	static void pn(double ans) {out.print(ans);};

	static class FastScanner {
	    private final InputStream in = System.in;
	    private final byte[] buffer = new byte[1024];
	    private int ptr = 0;
	    private int buflen = 0;

	    private boolean hasNextByte() {
	      if (ptr < buflen) {
	        return true;
	      } else {
	        ptr = 0;
	        try {
	          buflen = in.read(buffer);
	        } catch (IOException e) {
	          e.printStackTrace();
	        }
	        if (buflen <= 0) {
	          return false;
	        }
	      }
	      return true;
	    }

	    private int readByte() {
	      if (hasNextByte()) return buffer[ptr++];
	      else return -1;
	    }

	    private static boolean isPrintableChar(int c) {
	      return 33 <= c && c <= 126;
	    }

	    private void skipUnprintable() {
	      while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
	    }

	    public boolean hasNext() {
	      skipUnprintable();
	      return hasNextByte();
	    }

	    public String next() {
	      if (!hasNext()) throw new NoSuchElementException();
	      StringBuilder sb = new StringBuilder();
	      int b = readByte();
	      while (isPrintableChar(b)) {
	        sb.appendCodePoint(b);
	        b = readByte();
	      }
	      return sb.toString();
	    }

	    public long nextLong() {
	      if (!hasNext()) throw new NoSuchElementException();
	      long n = 0;
	      boolean minus = false;
	      int b = readByte();
	      if (b == '-') {
	        minus = true;
	        b = readByte();
	      }
	      if (b < '0' || '9' < b) {
	        throw new NumberFormatException();
	      }
	      while (true) {
	        if ('0' <= b && b <= '9') {
	          n *= 10;
	          n += b - '0';
	        } else if (b == -1 || !isPrintableChar(b)) {
	          return minus ? -n : n;
	        } else {
	          throw new NumberFormatException();
	        }
	        b = readByte();
	      }
	    }

	    public int nextInt() {
	      return (int) nextLong();
	    }

	    public double nextDouble(){
	    	return Double.parseDouble(next());
	    }

	    public int[] nextIntArray(int N, boolean oneBased) {
	      if (oneBased) {
	        int[] array = new int[N + 1];
	        for (int i = 1; i <= N; i++) {
	          array[i] = sc.nextInt();
	        }
	        return array;
	      } else {
	        int[] array = new int[N];
	        for (int i = 0; i < N; i++) {
	          array[i] = sc.nextInt();
	        }
	        return array;
	      }
	    }

	    public long[] nextLongArray(int N, boolean oneBased) {
	      if (oneBased) {
	        long[] array = new long[N + 1];
	        for (int i = 1; i <= N; i++) {
	          array[i] = sc.nextLong();
	        }
	        return array;
	      } else {
	        long[] array = new long[N];
	        for (int i = 0; i < N; i++) {
	          array[i] = sc.nextLong();
	        }
	        return array;
	      }
	    }
	  }
}


import java.text.DecimalFormat;
import java.util.stream.LongStream;
import java.util.stream.IntStream;
import java.io.*;
import java.util.*;

public class Main {

    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);

        AtCoder problem = new AtCoder(sc);
        problem.solve(sc, out);

        out.flush();
    }

}

class AtCoder {

    int N, M, K;

    AtCoder(FastScanner sc) {
        N = sc.nextInt();
        M = sc.nextInt();
        K = sc.nextInt();
    }

    void solve(FastScanner sc, PrintWriter out) {
        if (K % N == 0 || K % M == 0) {
            out.println("Yes");
            return;
        }
        if (N - 2 > 0) {
            int a = M;
            for (int i = 0; i < M; i++) {
                a += N - 2;
                if (a == K) {
                    out.println("Yes");
                    return;
                }
            }
        }
        if (M - 2 > 0) {
            int a = N;
            for (int i = 0; i < N; i++) {
                a += M - 2;
                if (a == K) {
                    out.println("Yes");
                    return;
                }
            }
        }
        out.println("No");
    }

}

class FastScanner {

    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;

    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        } else {
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }

    private int readByte() {
        if (hasNextByte()) {
            return buffer[ptr++];
        } else {
            return -1;
        }
    }

    private static boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    }

    public boolean hasNext() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr])) {
            ptr++;
        }
        return hasNextByte();
    }

    public String next() {
        if (!hasNext()) {
            throw new NoSuchElementException();
        }
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public long nextLong() {
        if (!hasNext()) {
            throw new NoSuchElementException();
        }
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while (true) {
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            } else if (b == -1 || !isPrintableChar(b)) {
                return minus ? -n : n;
            } else {
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }

    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) {
            throw new NumberFormatException();
        }
        return (int) nl;
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }

    public int[] arrayInt(int N) {
        int[] array = new int[N];
        for (int i = 0; i < N; i++) {
            array[i] = nextInt();
        }
        return array;
    }

    public long[] arrayLong(int N) {
        long[] array = new long[N];
        for (int i = 0; i < N; i++) {
            array[i] = nextLong();
        }
        return array;
    }

    public double[] arrayDouble(int N) {
        double[] array = new double[N];
        for (int i = 0; i < N; i++) {
            array[i] = nextDouble();
        }
        return array;
    }

    public String[] arrayString(int N) {
        String[] array = new String[N];
        for (int i = 0; i < N; i++) {
            array[i] = next();
        }
        return array;
    }

    public int randomInt() {
        Random r = new Random();
        int value = r.nextInt((int) 1e6);
        System.out.println(value);
        return value;
    }

    public int[] randomInt(int N) {
        int[] array = new int[N];
        Random r = new Random();
        for (int i = 0; i < N; i++) {
            array[i] = r.nextInt((int) 1e6);
        }
        System.out.println(Arrays.toString(array));
        return array;
    }

}

class My {

    static void ans(boolean b) {
        System.out.println(b ? "Yes" : "No");
    }

    static void ANS(boolean b) {
        System.out.println(b ? "YES" : "NO");
    }

    static String sort(String s) {
        char[] ch = s.toCharArray();
        Arrays.sort(ch);
        return String.valueOf(ch);
    }

    static String reverse(String s) {
        return new StringBuilder(s).reverse().toString();
    }

    static int[] reverse(int[] array) {
        for (int i = 0; i < array.length / 2; i++) {
            int temp = array[i];
            array[i] = array[array.length - 1 - i];
            array[array.length - 1 - i] = temp;
        }
        return array;
    }

    static long[] reverse(long[] array) {
        for (int i = 0; i < array.length / 2; i++) {
            long temp = array[i];
            array[i] = array[array.length - 1 - i];
            array[array.length - 1 - i] = temp;
        }
        return array;
    }

    static double[] reverse(double[] array) {
        for (int i = 0; i < array.length / 2; i++) {
            double temp = array[i];
            array[i] = array[array.length - 1 - i];
            array[array.length - 1 - i] = temp;
        }
        return array;
    }

    static String[] reverse(String[] array) {
        for (int i = 0; i < array.length / 2; i++) {
            String temp = array[i];
            array[i] = array[array.length - 1 - i];
            array[array.length - 1 - i] = temp;
        }
        return array;
    }

    static char[] reverse(char[] array) {
        for (int i = 0; i < array.length / 2; i++) {
            char temp = array[i];
            array[i] = array[array.length - 1 - i];
            array[array.length - 1 - i] = temp;
        }
        return array;
    }

    static long min(long... numbers) {
        Arrays.sort(numbers);
        return numbers[0];
    }

    static int min(int... numbers) {
        Arrays.sort(numbers);
        return numbers[0];
    }

    static double min(double... numbers) {
        Arrays.sort(numbers);
        return numbers[0];
    }

    static long max(long... numbers) {
        Arrays.sort(numbers);
        return numbers[numbers.length - 1];
    }

    static int max(int... numbers) {
        Arrays.sort(numbers);
        return numbers[numbers.length - 1];
    }

    static double max(double... numbers) {
        Arrays.sort(numbers);
        return numbers[numbers.length - 1];
    }

    static int sum(long number) {
        int sum = 0;
        while (number > 0) {
            sum += number % 10;
            number /= 10;
        }
        return sum;
    }

}


#include <cstdio>

int n, m, k;

int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i <= n; ++i)
    for (int j = 0; j <= m; ++j)
      if (i * m + j * n - 2 * i * j == k) return puts("Yes"), 0;
  puts("No");
  return 0;
}


#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<deque>
#include<string>
#include<string.h>
#include<vector>
#include<set>
#include<map>
#include<stdlib.h>
#include<cassert>
using namespace std;
const long long mod=1000000007;
const long long inf=mod*mod;
const long long d2=500000004;
const double EPS=1e-6;
const double PI=acos(-1.0);
int ABS(int a){return max(a,-a);}
long long ABS(long long a){return max(a,-a);}
int main(){
	int a,b,c;scanf("%d%d%d",&a,&b,&c);
	for(int i=0;i<=a;i++)for(int j=0;j<=b;j++){
		if(i*b+j*a-i*j*2==c){printf("Yes\n");return 0;}
	}
	printf("No\n");
}


#include <cstdio>
#include <algorithm>
#include <cstring>
#define N 100005
#define fi(a, b, c) for(int a = (b); a < (c); a++)
#define FI(a, b, c) for(int a = (b); a <= (c); a++)
using namespace std;

int n, m, k;

int main(){
	scanf("%d %d %d", &n, &m, &k);

	FI(i, 0, n) FI(j, 0, m){
		if(k == i * m + j * n - (i * j) * 2){
			puts("Yes");
			return 0;
		}
	}

	puts("No");
	return 0;
}


#include <bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<(n);i++)
#define rrep(i,n) for(ll i = 1; i <= (n); ++i)
#define drep(i,n) for(ll i = (n)-1; i >= 0; --i)
#define all(v) v.begin(),v.end()
#define len(x) (ll)(x).length()
#define maxs(x,y) x = max(x,y)
#define mins(x,y) x = min(x,y)
#define pb push_back
#define sz(x) (ll)(x).size()
#define v(T) vector<T>
#define vv(T) vector<vector<T>>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
ll gcd(ll a,ll b){if(a%b==0){return b;}else{return(gcd(b,a%b));}}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
const int INF=1e9;
const ll MX = 1e18;
const ll mod=INF+7;
const int di[] = {-1,0,1,0};
const int dj[] = {0,-1,0,1};
const double PI=acos(-1);
const string tr="abcdefghijklmnopqrstuvwxyz";
#define dame { puts("-1"); return 0;}
#define yn {puts("Yes");}else{puts("No");}
#define YN {puts("YES");}else{puts("NO");}
const ll MAX = 1000001;
long long fac[MAX], finv[MAX], inv[MAX];
ll llpow(ll n,ll i){ll cnt=n;  for(ll j=0;j<i-1;j++){n*=cnt;}return n;}
bool ip/*is_prime*/(long long N) {if (N == 1) return false;for (long long i = 2; i * i <= N; ++i) {if (N % i == 0) return false;}return true;}
int digit(ll N) {int ans = 0;while (N) {++ans;N /= 10;}return ans;}
vector<pair<ll,ll>> pf/*prime_factorize*/(ll n){vector<pair<ll,ll>> res;for(ll a=2;a*a<=n;a++){if(n%a!=0) continue;ll ex=0;while(n%a==0){ex++;n/=a;}res.pb({a,ex});}if(n!=1) res.pb({n,1});return res;}
vector<ll> div/*divisor*/(ll n){  vector<ll> res={1};for(ll a=2;a*a<=n;a++){if(n%a!=0) continue;ll b=n/a;res.pb(b);if(b!=a) res.pb(a);}sort(all(res));return res;}
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const { return pow(mod-2);}
  mint& operator/=(const mint a) { return *this *= a.inv();}
  mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}
struct combination {
  vector<mint> fact, ifact;
  combination(int n):fact(n+1),ifact(n+1) {
    assert(n < mod);
    fact[0] = 1;
    for (int i = 1; i <= n; ++i) fact[i] = fact[i-1]*i;
    ifact[n] = fact[n].inv();
    for (int i = n; i >= 1; --i) ifact[i-1] = ifact[i]*i;
  }
  mint operator()(int n, int k) {
    if (k < 0 || k > n) return 0;
    return fact[n]*ifact[k]*ifact[n-k];
  }
} c(200005);
struct UnionFind {
  vector<int> d;
  UnionFind(int n): d(n,-1) {}
  int root(int x) {
    if (d[x] < 0) return x;
    return d[x] = root(d[x]);
  }
  bool unite(int x, int y) {
    x = root(x); y = root(y);
    if (x == y) return false;
    if (d[x] > d[y]) swap(x,y);
    d[x] += d[y];
    d[y] = x;
    return true;
  }
  bool same(int x, int y) { return root(x) == root(y);}
  int size(int x) { return -d[root(x)];}
};

int main() {
  int n,m,k;
  cin>>n>>m>>k;
  rep(i,1000){
    rep(j,1000){
      if(n*i+m*j==k){
        cout<<"Yes"<<endl;
        return 0;
      }
    }
  }
  cout<<"No"<<endl;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cctype>
#include <cmath>
#include <ctime>
#include <stdlib.h>
#include <math.h>
#include <numeric>
#include <fstream>

//#include "atcoder/segtree.hpp"
using namespace std;

/*
#include <boost/multiprecision/cpp_int.hpp>
namespace mp = boost::multiprecision;
*/
/*
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
*/
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

//#define int long long
//#define endl "\n"
#define ALL(v)  v.begin(),v.end()
#define m_p make_pair
#define m_t make_tuple
#define rep(i,n)  for(int i=0; i<(int) (n); i++)
using P = pair<int, int>;
using ld = long double;
using ll = long long;
using VI = vector<int>;
using VVI = vector<vector<int>>;
using  VVC=vector<vector<char>>;
template<class T> using PQ_inv = priority_queue<T, vector<T>, greater<T>>;

const double pai = 3.1415926535897;
const int INF = 1000000021;
const ll LINF = 2000000000000000000;
const ll mod = 1000000007;
const int MAX = 2010000;
const ll MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];

struct edge {
	int to, cost;
};
edge m_e(int xx, int yy) {
	edge ed;
	ed.to = xx;
	ed.cost = yy;
	return ed;
}

const auto identify_element = 0;//単位元
template<class T>T op(T xx, T yy) {//セグ木、BITで扱う関数
	return max(xx, yy);
}
template<class T>class segment_tree {
	int root_size;//根の大きさ root_size+i-1でv[i]に対応する添え字を取得
	vector<T> data;
public:
	segment_tree(vector<T> v) {
		int a = 0;
		while (v.size() > (1ll << a))a++;
		root_size = 1ll << a;
		data.resize((root_size << 1) - 1, identify_element);
		rep(i, v.size()) {
			data[i + root_size - 1] = v[i];
		}
		for (int i = root_size - 2; i >= 0; i--) {
			data[i] = op(data[i * 2 + 1], data[i * 2 + 2]);
		}
	}
	segment_tree(int xx) {
		int a = 0;
		while (xx > (1ll << a))a++;
		root_size = 1ll << a;
		data.resize((root_size << 1) - 1, identify_element);
		rep(i, xx) {
			data[i + root_size - 1] = identify_element;
		}
		for (int i = root_size - 2; i >= 0; i--) {
			data[i] = op(data[i * 2 + 1], data[i * 2 + 2]);
		}
	}

	//seg[p]=xxにする
	void update(int p, T xx) {
		int a = p + root_size - 1;
		data[a] = xx;
		while (a != 0) {
			a = (a - 1) / 2;
			data[a] = op(data[a * 2 + 2], data[a * 2 + 1]);
		}
	}
	//0-indexedでxx番目の値を返す
	T get(int xx) {
		return data[root_size + xx - 1];
	}
	//0-indexed 閉区間でlからrのopの和
	T get_sum(int l, int r) {//0-indexed
		int a = 1/*2乗*/, p = l + root_size - 1/*足す場所の添え字*/;
		T ret = identify_element;/*答え*/
		bool bo = 1;
		while (r + 1 > l) {
			if (a > r - l + 1) {
				bo = 0;
				a >>= 1;
				p = p * 2 + 1;
				continue;
			}
			if (bo) {
				if (l & a) {
					ret = op(ret, data[p]);
					l += a;
					p++;
				}
				a <<= 1;
				p = (p - 1) / 2;
			}
			else {
				if (r - l + 1 & a) {
					ret = op(ret, data[p]);
					l += a;
					p++;
				}
				a >>= 1;
				p = p * 2 + 1;
			}
		}
		return ret;
	}
	//全体和
	T all() {
		return data[0];
	}
};

class BIT { //0-indexedで与える opは群
	vector<int>data;

public:;
	  BIT(vector<int>v) {
		  data.resize(v.size(), identify_element);
		  rep(i, v.size()) {
			  add(i, v[i]);
		  }
	  }
	  //data[p]にxxを加算
	  void add(int p, int xx) {
		  for (int i = p + 1; i <= (int)data.size(); i += (i & -i)) {
			  data[i - 1] += xx;
		  }
	  }
	  //0からrまでの総和
	  int get_sum(int r) {
		  int ret = identify_element;
		  for (int i = r + 1; i > 0; i -= (i & -i)) {
			  ret += data[i - 1];
		  }
		  return ret;
	  }
};

class union_find { //0-indexedで与える
	VI union_size;
public:;
	  VI table;
	  union_find(int xx) {
		  table.resize(xx);
		  rep(i, xx) table[i] = i;
		  union_size.resize(xx, 1);
	  }

	  int leader(int xx) {
		  if (table[xx] == xx)return xx;
		  return table[xx] = leader(table[xx]);
	  }
	  void marge(int xx, int yy) {
		  int a = leader(xx), b = leader(yy);
		  if (union_size[a] > union_size[b]) {
			  table[b] = a;
			  union_size[a] += union_size[b];
		  }
		  else {
			  table[a] = b;
			  union_size[b] += union_size[a];
		  }
	  }
	  int same(int xx, int yy) {
		  if (leader(xx) == leader(yy))return true;
		  else return false;
	  }
	  int size(int xx) {
		  return union_size[leader(xx)];
	  }
};

// テーブルを作る前処理
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; i++) {
		fac[i] = fac[i - 1] * i % MOD;
		inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
		finv[i] = finv[i - 1] * inv[i] % MOD;
	}
}
//n個を1個以上のx組のグループに分ける重複組み合わせはcom(n-1,x-1)
long long COM(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
ll PER(int n, int k) {
	if (n < 0 || k < 0) return 0;
	if (n < k) return fac[n];
	return fac[n] * finv[n - k] % mod;
}

long long modinv(long long a, long long m) {
	long long b = m, u = 1, v = 0;
	while (b) {
		long long t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= m;
	if (u < 0) u += m;
	return u;
}
long long modpow(int a, int n) {
	int res = 1;
	while (n > 0) {
		if (n & 1) res = res * a % mod;
		a = a * a % mod;
		n >>= 1;
	}
	return res;
}
long long fix_mod(int &xx) {
	if (xx >= mod * 2||xx<-mod*2) {
		xx %= mod;
	}
	if (xx >= mod)xx -= mod;
	//if (xx < 0)xx += mod;
	return xx;
}
//ax + by = gcd(a,b)を満たすx,yにする
long long extGCD(long long a, long long b, long long& x, long long& y) {
	if (b == 0) {
		x = 1;
		y = 0;
		return a;
	}
	long long d = extGCD(b, a % b, y, x);
	y -= a / b * x;
	return d;
}

template<class T>void vecout(vector<T>& vec) { for (T t : vec) cout << t << " "; cout << endl; }
template<class T>void vecout(vector<vector<T>>& vec) {for (vector<T>tvec : vec) {for (T t : tvec)cout << t << " "; cout << endl;}}
template<class T>void vecout(vector<pair<T, T>>& vec) {for (pair<T, T>p : vec) {cout << p.first << " " << p.second << endl;}}
template<class T>void vecin(vector<T>& vec) { for (int i = 0; i < (int)vec.size(); i++) cin >> vec[i]; }
bool chmax(int& xx, int yy) { if (xx < yy) { xx = yy; return true; }return false; }
bool chmin(int& xx, int yy) { if (xx > yy) { xx = yy; return true; }return false; }
//x未満の要素数を返す二分探索関数
int b_s(vector<int>& vec, int xx) { return lower_bound(ALL(vec), xx) - vec.begin(); }
int gcd(int xx, int yy) {
	if (yy > xx)swap(xx, yy);
	while (xx % yy != 0) {
		xx %= yy;
		swap(xx, yy);
	}
	return yy;
}
int lcm(int xx, int yy) {return (xx / gcd(xx, yy)) * yy;}
bool prime(int xx) {
	if (xx <= 1) return 0;
	if (xx == 2)return 1;
	for (int i = 3; i * i <= xx; i+=2) {
		if (xx % i == 0) {
			return 0;
		}
	}
	return 1;
}

signed main() {
	int n, m, k;
	cin >> n >> m >> k;
	rep(i, n+1) {
		rep(j, m+1) {
			if (i * (n - j) + j * (m - i) == k) {
				cout << "Yes" << endl;
				return 0;
			}
		}
	}
	cout << "No" << endl;
}


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

int main(){
    int n, m, k; cin >> n >> m >> k;

    for(int i=0; i<n; i++){
        for(int j=0; j<m; j++){
            int tmp = i*(m-j) + j*(n-i);
            if(tmp == k){
                cout << "Yes" << endl;
                return 0;
            }
        }
    }
    cout << "No" << endl;
    return 0;
}


#include <stdio.h>

int main(){
	int n,m,k;
	scanf("%d%d%d",&n,&m,&k);
	for(int i=0;i<=n;i++)for(int j=0;j<=m;j++){
		if(i*j+(n-i)*(m-j)==k){
			puts("Yes");
			return 0;
		}
	}
	puts("No");
}


#include <stdio.h>

int main(void) {

  int n,m,k;
  scanf("%d %d %d", &n, &m, &k);
  int black;
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= m; j++) {
      black = i*j+(n-i)*(m-j);
      if (black == k) {
        printf("Yes\n");
        return 0;
      }
    }
  }
  printf("No\n");

  return 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define Rep(i,a,n)for(int i=(int)(a);i<(int)(n);i++)
#define rep(i,n)Rep(i,0,n)

int main() {
	int n,m,k;
	scanf("%d %d %d", &n, &m, &k);
	if (k == n * m) { printf("Yes"); return 0; }
	rep(i, n) {
		rep(j, m) {
			if (k - i * (m - j) - j * (n - i) == 0) { printf("Yes"); return 0; }
		}
	}
	printf("No");
}


#include<stdio.h>
int main(){
  int a,b,c,i,j;
  scanf("%d %d %d",&a,&b,&c);
  for(i=0;i<a;i++){
    for(j=0;j<b;j++){
      if(i*j+(a-i)*(b-j)==c){
	printf("Yes\n");
	return 0;
      }
    }
  }
  printf("No\n");
  return 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define Rep(i,a,n)for(int i=(int)(a);i<(int)(n);i++)
#define rep(i,n)Rep(i,0,n)

int main() {
	int n,m,k;
	scanf("%d %d %d", &n,&m,&k);
	rep(i,n) {
		rep(j,m) {
			if (k-i*(m-j)-j*(n-i)==0) { printf("Yes"); return 0; }
		}
	}
	printf("No");
}


#include <stdio.h>
int main() {
	int n, m, k, num;
	scanf("%d%d%d", &n, &m, &k);
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < m; j++) {
			num = i * m + j * n - 2 * (i * j);
			if (num == k) {
				printf("Yes\n");
				return 0;
			}
		}
	}
	printf("No\n");
	return 0;
}


var input = require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n");
var obj = {
  "list" : input,
  "index" : 0,
  "max" : input.length,
  "next" : function(){
    if(!this.hasNext()){throw "NoSuchElementException:次に要素は無いよ";}
    var returnObj = this.list[this.index];
    this.index++;
    return returnObj;
  },
  "hasNext" : function(){return (this.index < this.max);}
}
Main();
function next(){return obj.next();}
function hasNext(){return obj.hasNext();}
function myout(t){console.log(t);}//standard output
function myerr(t){console.error(t);}//standard error
//[no]要素の扱い。数値型
//不明値、異常時:引数そのまま返す　1:数値へ変換
//2:半角SPで分割 4:半角SPで分割し、数値配列へ
//6:1文字で分割  7:1文字で分割し、数値配列へ
//8:半角SPで結合 9:改行で結合 0:文字なしで結合
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 4:return i.split(" ").map((a)=>Number(a));case 6:return i.split("");case 7:return i.split("").map((a)=>Number(a));case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}catch(e){return i;}}
function Main(){
  var one = myconv(next(),4);
  var N = one[0];
  var M = one[1];
  var K = one[2];
  if(K % M == 0 || K % N == 0){
     myout("Yes");
    return;
  }
  for(var i = 1; i <= N; i++){
    for(var j = 1; j <= M; j++){
      var count = (M * i) + (N * j) - 2 * (i * j);
      if(count == K){
         myout("Yes");
        return;
      }
    }
  }
  myout("No");
}


inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
l = inp.shift().split(' ')
N = l[0] * 1
M = l[1] * 1
K = l[2] * 1
f = 0
for (i=0; i<=N; i++) {
  for (j=0; j<=M; j++) {
      if ((M - j) * i + (N - i) * j == K) {
          f = 1
      }
  }
}
console.log(f ? 'Yes' : 'No')


module.exports=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){t(1)(t(2).readFileSync("/dev/stdin","UTF-8").split("\n"))},function(e,r,t){"use strict";function n(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=[],n=!0,o=!1,u=void 0;try{for(var i,f=e[Symbol.iterator]();!(n=(i=f.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,u=e}finally{try{n||null==f.return||f.return()}finally{if(o)throw u}}return t}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}e.exports=function(e){for(var r=n(e[0].split(" ").map(function(e){return Number(e)}),3),t=r[0],o=r[1],u=r[2],i=0;i<=t;i++)for(var f=0;f<=o;f++)if((t-i)*f+(o-f)*i==u)return void console.log("Yes");console.log("No")}},function(e,r){e.exports=require("fs")}]);


inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
l = inp.shift().split(' ')
N = l[0] * 1
M = l[1] * 1
K = l[2] * 1
f = 0
for (i=0; i<N; i++) {
  for (j=0; j<M; j++) {
      if ((M - j) * i + (N - i) * j == K) {
          f = 1
      }
  }
}
console.log(f ? 'Yes' : 'No')


inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
l = inp.shift().split(' ')
N = l[0] * 1
M = l[1] * 1
K = l[2] * 1
f = 0
for (i=0; i<=N; i++) {
  for (j=0; j<=M; j++) {
      if ((N - j) * i + (M - i) * j == K) {
          f = 1
      }
  }
}
console.log(f ? 'Yes' : 'No')


inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
l = inp.shift().split(' ')
N = l[0] * 1
M = l[1] * 1
K = l[2] * 1
f = 0
for (i=0; i<N; i++) {
  for (j=0; j<M; j++) {
      if ((N - j) * i + (M - i) * j == K) {
          f = 1
      }
  }
}
console.log(f ? 'Yes' : 'No')


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

func out(x ...interface{}) {
	fmt.Println(x...)
}

var sc = bufio.NewScanner(os.Stdin)

func getInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func getString() string {
	sc.Scan()
	return sc.Text()
}

// min, max, asub, absなど基本関数
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func asub(a, b int) int {
	if a > b {
		return a - b
	}
	return b - a
}

func abs(a int) int {
	if a >= 0 {
		return a
	}
	return -a
}

func lowerBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] >= x
	})
	return idx
}

func upperBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] > x
	})
	return idx
}

func main() {
	sc.Split(bufio.ScanWords)
	sc.Buffer([]byte{}, 1000000)
	N, M, K := getInt(), getInt(), getInt()

	for i := 0; i <= N; i++ {
		for j := 0; j <= M; j++ {
			k := (M-j)*i + (N-i)*j
			if K == k {
				out("Yes")
				return
			}
		}
	}
	out("No")
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

var mod = 1000000007

func main() {
	r := bufio.NewReader(os.Stdin)
	var n, m, k int
	fmt.Fscan(r, &n)
	fmt.Fscan(r, &m)
	fmt.Fscan(r, &k)

	ans := "No"
LOOP:
	for i := 0; i <= n; i++ {
		for j := 0; j <= m; j++ {
			if i*(m-j)+j*(n-i) == k {
				ans = "Yes"
				break LOOP
			}
		}
	}
	fmt.Println(ans)
}

// Union-Find
type unionFind struct {
	d []int
}

func newUnionFind(n int) *unionFind {
	uf := new(unionFind)
	uf.d = make([]int, n)
	for i := 0; i < n; i++ {
		uf.d[i] = -1
	}
	return uf
}

func (uf *unionFind) find(x int) int {
	if uf.d[x] < 0 {
		return x
	}
	uf.d[x] = uf.find(uf.d[x])
	return uf.d[x]
}

func (uf *unionFind) unite(x, y int) bool {
	rootX := uf.find(x)
	rootY := uf.find(y)
	if rootX == rootY {
		return false
	}

	if uf.d[rootX] < uf.d[rootY] {
		uf.d[rootX] += uf.d[rootY]
		uf.d[rootY] = rootX
	} else {
		uf.d[rootY] += uf.d[rootX]
		uf.d[rootX] = rootY
	}

	return true
}

func (uf *unionFind) same(x, y int) bool {
	return uf.find(x) == uf.find(y)
}

func (uf *unionFind) size(x int) int {
	return -uf.d[uf.find(x)]
}

// mod
func modpow(a, n, mod int) int {
	res := 1
	for n > 0 {
		if n%2 != 0 {
			res = res * a % mod
		}
		a = a * a % mod
		n = n / 2
	}
	return res
}

func modinv(n, mod int) int {
	return modpow(n, mod-2, mod)
}

func modcomb(n, a, mod int) int {
	x := 1
	y := 1
	for i := 0; i < a; i++ {
		x = x * (n - i)
		x %= mod
		y = y * (i + 1)
		y %= mod
	}
	return x * modpow(y, mod-2, mod) % mod
}

func modfactorial(n, mod int) int {
	result := 1
	for i := 1; i <= n; i++ {
		result = (result * i) % mod
	}
	return result
}

// Combination ...
type Combination struct {
	facts, invs []int
	mod         int
}

// NewCombination ...
func NewCombination(n, mod int) Combination {
	return Combination{
		facts: make([]int, n+1),
		invs:  make([]int, n+1),
		mod:   mod,
	}
}

func (cmb *Combination) calc(n, k int) int {
	ret := cmb.facts[n] * cmb.invs[k]
	ret %= cmb.mod
	ret = ret * cmb.invs[n-k]
	ret %= cmb.mod
	return ret
}

func (cmb *Combination) init(n int) {
	cmb.facts[0] = 1
	// 階乗を算出
	for i := 1; i <= n; i++ {
		cmb.facts[i] = cmb.facts[i-1] * i % cmb.mod
	}
	// 逆元を算出
	cmb.invs[n] = modinv(cmb.facts[n], cmb.mod)
	for i := n - 1; i >= 0; i-- {
		cmb.invs[i] = cmb.invs[i+1] * (i + 1) % cmb.mod
	}
}

// Utility
func min(x, y int) int {
	if x < y {
		return x
	}
	return y
}

func max(x, y int) int {
	if x > y {
		return x
	}
	return y
}

func abs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}

func primeFactor(x int) map[int]int {
	res := make(map[int]int)
	for i := 2; i*i <= x; i++ {
		for x%i == 0 {
			res[i]++
			x = x / i
		}
	}
	if x != 1 {
		res[x] = 1
	}
	return res
}

func divisor(x int) []int {
	res := make([]int, 0)
	for i := 1; i*i <= x; i++ {
		if x%i == 0 {
			res = append(res, i)
			if i != x/i {
				res = append(res, x/i)
			}
		}
	}
	return res
}

func gcd(x, y int) int {
	if y == 0 {
		return x
	}
	return gcd(y, x%y)
}

func lcm(x, y int) int {
	return x / gcd(x, y) * y
}

func reverseString(s string) string {
	r := []rune(s)
	for i, j := 0, len(r)-1; i < len(r)/2; i, j = i+1, j-1 {
		r[i], r[j] = r[j], r[i]
	}
	return string(r)
}

func pow(a, n int) int {
	ret := 1
	for i := 1; i <= n; i++ {
		ret *= a
	}
	return ret
}

// Queue ...
type Queue []int

// pop ...
func (q *Queue) empty() bool {
	return len(*q) == 0
}

// push ...
func (q *Queue) push(i int) {
	*q = append(*q, i)
}

// pop ...
func (q *Queue) pop() (int, bool) {
	if q.empty() {
		return 0, false
	} else {
		res := (*q)[0]
		*q = (*q)[1:]
		return res, true
	}
}

// Stack ...
type Stack []int

// pop ...
func (s *Stack) empty() bool {
	return len(*s) == 0
}

// push ...
func (s *Stack) push(i int) {
	*s = append(*s, i)
}

// pop ...
func (s *Stack) pop() (int, bool) {
	if s.empty() {
		return 0, false
	} else {
		index := len(*s) - 1
		res := (*s)[index]
		*s = (*s)[:index]
		return res, true
	}
}

// priority_queue
type intHeap []int

func (h intHeap) Len() int           { return len(h) }
func (h intHeap) Less(i, j int) bool { return h[i] > h[j] }
func (h intHeap) Swap(i, j int)      { h[i], h[j] = h[j], h[i] }
func (h *intHeap) Push(x interface{}) {
	*h = append(*h, x.(int))
}
func (h *intHeap) Pop() interface{} {
	old := *h
	n := len(old)
	x := old[n-1]
	*h = old[0 : n-1]
	return x
}

// sortable points
type point struct {
	x int
	y int
}

type points []point

func (p points) Len() int {
	return len(p)
}

func (p points) Less(i, j int) bool {
	return p[i].x < p[j].x
}

func (p points) Swap(i, j int) {
	p[i], p[j] = p[j], p[i]
}


package main
import "fmt"
func main(){
	var N, M, K int
	fmt.Scan(&N, &M, &K)
	for i:=0; i<=N; i++{
		for j:=0; j<=M; j++{
			if (M-j)*i + (N-i)*j==K{
				fmt.Println("Yes")
				return
			}
		}
	}
	fmt.Println("No")
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	N, M, K := ReadInt(), ReadInt(), ReadInt()
	for a := 0; a < M; a++ {
		for b := 0; b < N; b++ {
			x := N*a + M*b - 2*a*b
			if x == K {
				fmt.Println("Yes")
				return
			}
		}
	}
	fmt.Println("No")
}

var reader = bufio.NewReader(os.Stdin)

func Scan(a ...interface{}) {
	if _, err := fmt.Fscan(reader, a...); err != nil {
		panic(err)
	}
}
func ReadInt() (i int)       { Scan(&i); return }
func ReadString() (s string) { Scan(&s); return }
func ReadInts(n int) []int {
	v := make([]int, n)
	for i := 0; i < n; i++ {
		Scan(&v[i])
	}
	return v
}


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

//Util
func nextStr() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func maxInt(a, b int) int {
	if a > b {
		return a
	} else {
		return b
	}
}

func minInt(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}

func absInt(a int) int {
	if a >= 0 {
		return a
	} else {
		return -a
	}
}

func absFloat64(a float64) float64 {
	if a >= 0 {
		return a
	} else {
		return -a
	}
}

func maxFloat64(a, b float64) float64 {
	if a > b {
		return a
	} else {
		return b
	}
}

func minFloat64(a, b float64) float64 {
	if a > b {
		return b
	} else {
		return a
	}
}

func str2Int(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}

func reverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}

func powInt(p, q int) int {
	return int(math.Pow(float64(p), float64(q)))
}

func isPrime(x int) bool {
	if x == 1 {
		return false
	}
	if x == 2 {
		return true
	}
	if x%2 == 0 {
		return false
	}

	b := true
	rootx := int(math.Sqrt(float64(x)))
	i := 3
	for i <= rootx {
		if x%i == 0 {
			b = false
			break
		}
		i += 2
	}
	return b
}

func PrimeFactors(n int) (pfs []int) {
	// Get the number of 2s that divide n
	for n%2 == 0 {
		pfs = append(pfs, 2)
		n = n / 2
	}

	// n must be odd at this point. so we can skip one element
	// (note i = i + 2)
	for i := 3; i*i <= n; i = i + 2 {
		// while i divides n, append i and divide n
		for n%i == 0 {
			pfs = append(pfs, i)
			n = n / i
		}
	}

	// This condition is to handle the case when n is a prime number
	// greater than 2
	if n > 2 {
		pfs = append(pfs, n)
	}

	return
}

func PrimeFactorsMap(n int) map[int]int {
	pfs := map[int]int{}
	// Get the number of 2s that divide n
	for n%2 == 0 {
		if _, ok := pfs[2]; ok {
			pfs[2]++
		} else {
			pfs[2] = 1
		}
		//pfs = append(pfs, 2)
		n = n / 2
	}

	// n must be odd at this point. so we can skip one element
	// (note i = i + 2)
	for i := 3; i*i <= n; i = i + 2 {
		// while i divides n, append i and divide n
		for n%i == 0 {
			if _, ok := pfs[i]; ok {
				pfs[i]++
			} else {
				pfs[i] = 1
			}
			n = n / i
		}
	}

	// This condition is to handle the case when n is a prime number
	// greater than 2
	if n > 2 {
		if _, ok := pfs[n]; ok {
			pfs[n]++
		} else {
			pfs[n] = 1
		}
	}

	return pfs
}

func sumInts(x []int) int {

	total := 0
	for _, v := range x {
		total += v
	}

	return total
}

func swap(a int, b int) (int, int) {
	return b, a
}

func gcd(a, b int) int {
	if b == 0 {
		return a
	}
	return gcd(b, a%b)
}

func lcm(a, b int) int {

	return a / b * gcd(a, b)

}

//Main
const (
	initialBufSize = 10000
	maxBufSize     = 1000000
	mod            = 1e9 + 7
)

var (
	sc *bufio.Scanner = func() *bufio.Scanner {
		sc := bufio.NewScanner(os.Stdin)
		buf := make([]byte, initialBufSize)
		sc.Buffer(buf, maxBufSize)
		return sc
	}()
)

func main() {
	sc.Split(bufio.ScanWords)
	N, M, K := nextInt(), nextInt(), nextInt()

	//r: 行ボタンを押した数
	//c: 列ボタンを押した数
	for r := 0; r < N; r++ {
		for c := 0; c < M; c++ {
			if c*N-r*c+r*(M-c) == K {
				fmt.Println("Yes")
				return
			}
		}
	}

	fmt.Println("No")
	return

}


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func swap(a int64, b int64) (int64, int64) {
	return b, a
}

func gcd(a int64, b int64) int64 {
	if b > a {
		a, b = swap(a, b)
	}
	if b == 0 {
		return a
	} else {
		return gcd(a%b, b)
	}
}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func min(nums ...int64) int64 {
	if len(nums) == 0 {
		panic("funciton min() requires at least one argument.")
	}
	res := nums[0]
	for i := 0; i < len(nums); i++ {
		res = int64(math.Min(float64(res), float64(nums[i])))
	}
	return res
}

func max(nums ...int64) int64 {
	if len(nums) == 0 {
		panic("funciton max() requires at least one argument.")
	}
	res := nums[0]
	for i := 0; i < len(nums); i++ {
		res = int64(math.Max(float64(res), float64(nums[i])))
	}
	return res
}

func nextLong() int64 {
	sc.Scan()
	i, e := strconv.ParseInt(sc.Text(), 10, 64)
	if e != nil {
		panic(e)
	}
	return i
}

func nextString() string {
	sc.Scan()
	s := sc.Text()
	return s
}

func nextByte() byte {
	sc.Scan()
	s := sc.Bytes()
	return s[0]
}

func main() {
	sc.Split(bufio.ScanWords)
	//ans := 1
	N := nextInt()
	M := nextInt()
	K := nextInt()
	Blacknum := 0
	Clear := false
	for row := 0; row <= N; row++ {
		for col := 0; col <= M; col++ {
			Blacknum = (N-col)*row + (M-row)*col
			if Blacknum == K {
				Clear = true
			}
		}
	}
	if Clear {
		fmt.Printf("Yes\n")
	} else {
		fmt.Printf("No\n")
	}
}


n,m,k = gets.split.map(&:to_i)

(n+1).times do |i|
    if n - 2 * i == 0
        if n * m / 2 == 0
            puts "Yes"
            exit
        else
            next
        end
    end

    j = (k - i * m) / (n - 2 * i)
    if 0 <= j && j <= m && i * (m - j) + (n - i) * j == k
        puts "Yes"
        exit
    end
end

puts "No"


N,M,K=gets.split.map &:to_i
puts (0..M).any?{|a|g=K-N*a;t=M-2*a;g==0||t!=0&&g%t==0&&(0..N)===g/t}?:Yes: :No


N,M,K=gets.split.map &:to_i;puts (0..N).any?{|k|x=K-k*M;y=N-2*k;y==0?x==0:(l=x/y;x%y==0&&0<=l&&l<=M)}?:Yes: :No


n, m, k = gets.split.map(&:to_i)
n.times do |i|
  m.times do |j|
    if n * m - (n - i) * (m - j) - i * j == k
      puts 'Yes'
      exit
    end
  end
end
puts 'No'


n, m, k = gets.split.map(&:to_i)
n.times do |i|
  m.times do |j|
    if (n - j) * (m - i) + i * j == k
      puts 'Yes'
      exit
    end
  end
end
puts 'No'


n, m, k = gets.split.map(&:to_i)
n.times do |i|
  m.times do |j|
    if (n - j) * i + (m - i) * j == k
      puts 'Yes'
      exit
    end
  end
end
puts 'No'


use std::io::stdin;
// code...
fn main() {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    let (n, m, k): (usize, usize, usize) = {
        let p: Vec<usize> = buf
            .trim()
            .split_whitespace()
            .map(|x| x.parse().unwrap())
            .collect();
        (p[0], p[1], p[2])
    };

    let mut ans = "No";
    for i in 0..n + 1 {
        for j in 0..m + 1 {
            if i * m + j * n - 2 * i * j == k {
                ans = "Yes";
            }
        }
    }

    println!("{}", ans);
}


#![allow(unused_imports, unused_macros, dead_code)]

macro_rules! min {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        it.next().map(|z| it.fold(z, |x, y| min!(x, y)))
    }};
    ($x:expr) => ($x);
    ($x:expr, $($ys:expr),*) => {{
        let t = min!($($ys),*);
        if $x < t { $x } else { t }
    }}
}
macro_rules! max {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        it.next().map(|z| it.fold(z, |x, y| max!(x, y)))
    }};
    ($x:expr) => ($x);
    ($x:expr, $($ys:expr),*) => {{
        let t = max!($($ys),*);
        if $x > t { $x } else { t }
    }}
}
macro_rules! ewriteln {
    ($($args:expr),*) => { let _ = writeln!(&mut std::io::stderr(), $($args),*); };
}
macro_rules! trace {
    ($x:expr) => { ewriteln!(">>> {} = {:?}", stringify!($x), $x) };
    ($($xs:expr),*) => { trace!(($($xs),*)) }
}
macro_rules! put {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        if let Some(x) = it.next() { print!("{}", x); }
        for x in it { print!(" {}", x); }
        println!("");
    }};
    ($x:expr) => { println!("{}", $x) };
    ($x:expr, $($xs:expr),*) => { print!("{} ", $x); put!($($xs),*) }
}

const M: i64 = 1_000_000_007;

fn main() {
    let mut sc = Scanner::new();
    let n: usize = sc.cin();
    let m: usize = sc.cin();
    let k: usize = sc.cin();
    let mut ans = "No";
    for i in 0..n+1 {
        for j in 0..m+1 {
            let a = i * m + j * n - i * j * 2;
            // trace!((i, j), (m, n), a);
            if a == k {
                ans = "Yes";
            }
        }
    }
    put!(ans);
}

use std::io::{self, Write};
use std::str::FromStr;
use std::collections::VecDeque;

struct Scanner { stdin: io::Stdin, buffer: VecDeque<String>, }
impl Scanner {
    fn new() -> Self { Scanner { stdin: io::stdin(), buffer: VecDeque::new() } }
    fn cin<T: FromStr>(&mut self) -> T {
        while self.buffer.len() == 0 {
            let mut line = String::new();
            let _ = self.stdin.read_line(&mut line);
            for w in line.split_whitespace() {
                self.buffer.push_back(String::from(w));
            }
        }
        self.buffer.pop_front().unwrap().parse::<T>().ok().unwrap()
    }
    fn chars(&mut self) -> Vec<char> { self.cin::<String>().chars().collect() }
    fn vec<T: FromStr>(&mut self, n: usize) -> Vec<T> { (0..n).map(|_| self.cin()).collect() }
}


#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };

    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        #[cfg(debug_assertions)]
        writeln!(&mut std::io::stderr(), concat!("[DEBUG] ", $(stringify!($a), "={:?} "),*), $($a),*);
    }
}

#[allow(unused_imports)]
use std::cmp::{min, max};
#[allow(unused_imports)]
use std::io::{stdout, stdin, BufWriter, Write};

fn main() {
    let out = std::io::stdout();
    let mut out = BufWriter::new(out.lock());
    macro_rules! puts {
        ($($format:tt)*) => (write!(out,$($format)*).unwrap());
    }

    input!{
      n: usize,
      m: usize,
      k: usize,
    }

    for i in 0..n+1 {
        for j in 0..m+1 {
            let black = m*i + n*j - 2*i*j;
            if black == k {
                return puts!("{}\n", "Yes");
            }
        }
    }
    puts!("{}\n", "No");
}


use proconio::input;

fn main() {
    input! {
        n: usize,
        m: usize,
        k: usize,
    };
    let mut ans = false;
    for r in 0..n {
        for c in 0..m {
            if r * (m - c) + c * (n - r) == k {
                ans = true;
            }
        }
    }
    println!("{}", if ans { "Yes" } else { "No" });
}


use proconio::input;

fn main() {
    input! {
        n: usize,
        m: usize,
        k: usize,
    };
    let mut ans = false;
    for r in 0..n {
        for c in 0..m {
            if r * m + c * n - r * c * 2 == k {
                ans = true;
            }
        }
    }
    println!("{}", if ans { "Yes" } else { "No" });
}


// -*- coding:utf-8-unix -*-

use proconio::input;

fn main() {
    input! {
        n: i32,
        m: i32,
        k: i32,
    }

    for i in 0..n + 1 {
        for j in 0..m + 1 {
            if (m * i) + j * (m - 2 * i) == k {
                println!("Yes");
                return;
            }
        }
    }
    println!("No");
}


let i=readLine()!.characters.split(" ").map{Int(String($0))!},N=i[0],M=i[1],K=i[2]
var ans="No"
for i in 0...N {
  for j in 0...M {
    if (N-i)*j+(M-j)*i==K {
      ans="Yes"
    }
  }
}
print(ans)


import Foundation

extension String {
    func toIntList() -> [Int] {
        return self.split(separator: " ").map{Int($0)!}
    }

    func toList() -> [String] {
        return self.map{String($0)}
    }

    func count(c:Character) -> Int{
        var result = 0

        for e in self{
            if e == c{
                result += 1
            }
        }
        return result
    }

    func counter() -> Dictionary<Character, Int>{
        var result:[Character:Int] = [:]

        for c in self{
            guard let _ = result.index(forKey: c) else {
                result[c] = 1
                continue
            }
            result[c]! += 1
        }
        return result
    }
}

extension Int {
    func toBin() -> String {
        return String(self, radix: 2)
    }

    func toD() -> Double {
        return Double(self)
    }
}

extension Double {
    func toI() -> Int {
        return Int(self)
    }
}

extension Array where Element: Equatable{
    func count(n:Self.Element) -> Int{
        var result = 0
        for e in self{
            if e == n{
                result += 1
            }
        }
        return result
    }
}

func codefes2017a() -> String {
    let NMK = readLine()!.toIntList()
    let N = NMK[0]
    let M = NMK[1]
    let K = NMK[2]
    var tmp = 0
    for n in 0...N{
        for m in 0...M{
            var x = n*(M-m)
            var y = m*(N-n)
            if (x+y) == K{
                return "Yes"
            }
        }
    }
    return "No"
}

print(codefes2017a())


import Foundation

extension String {
    func toIntList() -> [Int] {
        return self.split(separator: " ").map{Int($0)!}
    }

    func toList() -> [String] {
        return self.map{String($0)}
    }

    func count(c:Character) -> Int{
        var result = 0

        for e in self{
            if e == c{
                result += 1
            }
        }
        return result
    }

    func counter() -> Dictionary<Character, Int>{
        var result:[Character:Int] = [:]

        for c in self{
            guard let _ = result.index(forKey: c) else {
                result[c] = 1
                continue
            }
            result[c]! += 1
        }
        return result
    }
}

extension Int {
    func toBin() -> String {
        return String(self, radix: 2)
    }

    func toD() -> Double {
        return Double(self)
    }
}

extension Double {
    func toI() -> Int {
        return Int(self)
    }
}

extension Array where Element: Equatable{
    func count(n:Self.Element) -> Int{
        var result = 0
        for e in self{
            if e == n{
                result += 1
            }
        }
        return result
    }
}

func codefes2017a() -> String {
    let NMK = readLine()!.toIntList()
    let N = NMK[0]
    let M = NMK[1]
    let K = NMK[2]
    var tmp = 0
    for n in 0..<N{
        for m in 0..<M{
            var x = n*(M-m)
            var y = m*(N-n)
            if (x+y) == K{
                return "Yes"
            }
        }
    }
    return "No"
}

print(codefes2017a())


declare function require(x: string): any;

var input = require("fs").readFileSync("/dev/stdin", "utf8");
input = input.split("\n");
const [n, m, k] = input[0].split(" ").map((x: string): number => +x);

let flg_yes = false;
top:
for (let h = 0; h <= n; h++) {
	for (let w = 0; w <= m; w++) {
		const num = h*m+w*n-h*w*2;
		if(num == k) {
			flg_yes = true;
			break top;
		}
	}
}

if(flg_yes) console.log("Yes");
else console.log("No");


declare function require(x: string): any;

var input = require("fs").readFileSync("/dev/stdin", "utf8");
input = input.split("\n");
const [n, m, k] = input[0].split(" ").map((x: string): number => +x);

let flg_yes = false;
top:
for (let h = 0; h < n; h++) {
	for (let w = 0; w < m; w++) {
		const num = h*m+w*n-h*w*2;
		if(num == k) {
			flg_yes = true;
			break top;
		}
	}
}

if(flg_yes) console.log("Yes");
else console.log("No");


n = int(input())
d = []

for i in range(n):
    v = int(input())
    if v in d:
        pass
    else:
        d.append(v)

print(len(d))


N=int(input())
alist=[]
for i in range(N):
    alist.append(int(input()))
#print(alist)
hh = [0]*101
for i in range(N):
    hh[alist[i]] = max(1,hh[alist[i]])
#print(hh)
ss = sum(hh)
print(ss)


n = int(input())
d = []
for i in range(n):
	a = int(input())
	d.append(a)
newd = list(set(d))
print(len(newd))


num = int(input())
a = []

for i in range(num):
    n = int(input())
    a.append(n)

myset = set(a)

len_list = len(frozenset(myset))

print(myset)

print(len_list)


s = list(str(input()))
t = list(str(input()))

asc_s = sorted(s)
desc_t = sorted(t, reverse=True)

print("Yes" if ''.join(asc_s) < ''.join(desc_t) else "No")


import sys

a = []
for l in sys.stdin:
    a.append(int(l))

myset = set(a)

len_list = len(frozenset(myset))

print(len_list - 1)


import java.io.BufferedReader;
import java.io.InputStreamReader;

import java.util.Arrays;
import java.util.Collections;
import java.util.ArrayList;
import java.util.List;
import java.util.HashSet;

public class Main {
    // 標準入力
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    // 標準入力数値配列用 int
    static int[] inputval() throws Exception {
        String[] strarray = br.readLine().trim().split(" ");
        int[] intarray = new int[strarray.length];
        for (int i = 0; i < intarray.length; i++) {
            intarray[i] = Integer.parseInt(strarray[i]);
        }
        return intarray;
    }

    // 標準入力数値配列用 integer ソート用
    static Integer[] inputvalInteger() throws Exception {
        String[] strarray = br.readLine().trim().split(" ");
        Integer[] intarray = new Integer[strarray.length];
        for (int i = 0; i < intarray.length; i++) {
            intarray[i] = Integer.parseInt(strarray[i]);
        }
        return intarray;
    }

    public static void main(String[] args) throws Exception {
	// write your code here
        int n = Integer.parseInt(br.readLine().trim());
        List<Integer> tmp = new ArrayList<Integer>();
        for (int i=0; i<n; i++){
            int d = Integer.parseInt(br.readLine().trim());
            tmp.add(d);
        }
        List<Integer> dl = new ArrayList<Integer>(new HashSet<>(tmp));
        System.out.println(dl.size());
    }

}


import java.io.IOException;
import java.util.NoSuchElementException;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;

import java.util.HashSet;

public class Main {
    public static void main(String[] args) throws IOException {
        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            FastScanner fs = new FastScanner();

            final int N = fs.nextInt();

            HashSet<Integer> hs = new HashSet<Integer>();

            for (int i = 0 ; i < N; i++) {
                int d = fs.nextInt();
                hs.add(d);
            }

            System.out.println(hs.size());
        }
    }
}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        } else {
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() {
        if (hasNextByte()) return buffer[ptr++];
        else return -1;
    }
    private static boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    }
    public boolean hasNext() {
        while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
        return hasNextByte();
    }
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true) {
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            } else if(b == -1 || !isPrintableChar(b)) {
                return minus ? -n : n;
            } else {
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
            throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() {
        return Double.parseDouble(next());
    }
}


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.NoSuchElementException;

public class Main{
	static FastScanner sc = new FastScanner();
	static PrintWriter out = new PrintWriter(System.out);
	static String S;
	static int n;
	static int m;

	public static void main(String[] args) {
		n = sc.nextInt();

		HashMap <Integer, Integer> map = new HashMap ();

		for (int i=0; i<n; i++)
			map.put(sc.nextInt(), 1);

		out.println(map.size());

		out.flush();
	}

		static class FastScanner {
		    private final InputStream in = System.in;
		    private final byte[] buffer = new byte[1024];
		    private int ptr = 0;
		    private int buflen = 0;

		    private boolean hasNextByte() {
		      if (ptr < buflen) {
		        return true;
		      } else {
		        ptr = 0;
		        try {
		          buflen = in.read(buffer);
		        } catch (IOException e) {
		          e.printStackTrace();
		        }
		        if (buflen <= 0) {
		          return false;
		        }
		      }
		      return true;
		    }

		    private int readByte() {
		      if (hasNextByte()) return buffer[ptr++];
		      else return -1;
		    }

		    private static boolean isPrintableChar(int c) {
		      return 33 <= c && c <= 126;
		    }

		    private void skipUnprintable() {
		      while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
		    }

		    public boolean hasNext() {
		      skipUnprintable();
		      return hasNextByte();
		    }

		    public String next() {
		      if (!hasNext()) throw new NoSuchElementException();
		      StringBuilder sb = new StringBuilder();
		      int b = readByte();
		      while (isPrintableChar(b)) {
		        sb.appendCodePoint(b);
		        b = readByte();
		      }
		      return sb.toString();
		    }

		    public long nextLong() {
		      if (!hasNext()) throw new NoSuchElementException();
		      long n = 0;
		      boolean minus = false;
		      int b = readByte();
		      if (b == '-') {
		        minus = true;
		        b = readByte();
		      }
		      if (b < '0' || '9' < b) {
		        throw new NumberFormatException();
		      }
		      while (true) {
		        if ('0' <= b && b <= '9') {
		          n *= 10;
		          n += b - '0';
		        } else if (b == -1 || !isPrintableChar(b)) {
		          return minus ? -n : n;
		        } else {
		          throw new NumberFormatException();
		        }
		        b = readByte();
		      }
		    }

		    public int nextInt() {
		      return (int) nextLong();
		    }

		    public int[] nextIntArray(int N, boolean oneBased) {
		      if (oneBased) {
		        int[] array = new int[N + 1];
		        for (int i = 1; i <= N; i++) {
		          array[i] = sc.nextInt();
		        }
		        return array;
		      } else {
		        int[] array = new int[N];
		        for (int i = 0; i < N; i++) {
		          array[i] = sc.nextInt();
		        }
		        return array;
		      }
		    }

		    public long[] nextLongArray(int N, boolean oneBased) {
		      if (oneBased) {
		        long[] array = new long[N + 1];
		        for (int i = 1; i <= N; i++) {
		          array[i] = sc.nextLong();
		        }
		        return array;
		      } else {
		        long[] array = new long[N];
		        for (int i = 0; i < N; i++) {
		          array[i] = sc.nextLong();
		        }
		        return array;
		      }
		    }
		  }

		}


import java.io.*;
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int count = scn.nextInt();
		int[] mochi = new int[count];
		for (int i = 0; i < count; i++) {
			 mochi[i] = scn.nextInt();
		}
		//int[] mochiSort = new int[count];
		Arrays.sort(mochi);
		int total = 0;
		int tmp = 0;
		for (int i = 0; i < mochi.length; i++) {
			if(tmp != mochi[i] ) {
				tmp = mochi[i];
				total++;
			}
		}
		System.out.println();

	}

}

class FastScanner {
    private BufferedReader reader = null;
    private StringTokenizer tokenizer = null;
    public FastScanner(InputStream in) {
        reader = new BufferedReader(new InputStreamReader(in));
        tokenizer = null;
    }

    public String next() {
        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public String nextLine() {
        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                return reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken("\n");
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public double nextDouble() {
         return Double.parseDouble(next());
    }

    public String[] nextArray(int n) {
        String[] a = new String[n];
        for (int i = 0; i < n; i++)
            a[i] = next();
        return a;
    }

    public int[] nextIntArray(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = nextInt();
        return a;
    }

    public long[] nextLongArray(int n) {
        long[] a = new long[n];
        for (int i = 0; i < n; i++)
            a[i] = nextLong();
        return a;
    }
}


import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] d = new int[n];
		for(int i=0; i<n; i++){
			d[i] = sc.nextInt();
		}
      	Arrays.sort(d);
      	int count = 0;
      	for(int i=1; i<n; i++){
          if(d[i]!=d[i-1]) count++;
        }
      	System.out.println(count);
	}
}


import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<Integer> list = new ArrayList<>();
        for(int i = 0 ; i < n ; i ++){
          list.add(sc.nextInt());
        }
		 List<Integer> listB = new ArrayList<Integer>(new HashSet<>(list));

      	 System.out.print(listB.length());

    }
}


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

int main(){
	int N;
	cin>>N;

	vector<int> D(N);

	for(int i=0;i<N;i++)cin>>D[i];

	sort(D.begin(), D.end(),greater<int>());

	int ans=1;

	for(int i=1;i<N;i++){
		if(D[i-1]!=D[i]){
			ans++;
		}

	}

	cout << ans;

}


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

int main() {
  int N,count;
  count=1;
  cin>>N;
  vector<int> vec(N);
  for (int i=0;i<N;i++)
    cin>>vec.at(i);
  sort (vec.begin(),vec.end());
  reverse (vec.begin(),vec.end());
  if(N==1)
    cout<<1<<endl;
  else{
    for (int i=0;i<N-1;i++){
      if(vec.at(i)>vec.at(i+1))
        count++;
      else
        continue;
    }
    cout<<count<<endl;
  }
}


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

int main() {
  int N;
  cin >> N;

  vector<int>mochi(N);
  for(int i; i<N; i++){
    cin >> mochi.at(i);
  }

  sort(mochi.begin(), mochi.end());
  reverse(mochi.begin(), mochi.end());

  int count = 0;
  for(int i=0; i<N; i++){
    if(N != 1){
    	if(mochi[i] == mochi[i-1]){ count--; }
    }
    count++;
  }

  cout << count << endl;
}