diff --git a/task_01.py b/task_01.py new file mode 100644 index 0000000..47aafe9 --- /dev/null +++ b/task_01.py @@ -0,0 +1,6 @@ +a = int(input()) +b = int(input()) +if a > b: + print(b) +else: + print(a) diff --git a/task_02.py b/task_02.py new file mode 100644 index 0000000..1cbf625 --- /dev/null +++ b/task_02.py @@ -0,0 +1,7 @@ +num = int(input()) +if num > 0: + print(1) +elif num < 0: + print(-1) +else: + print(0) diff --git a/task_03.py b/task_03.py new file mode 100644 index 0000000..64d6d64 --- /dev/null +++ b/task_03.py @@ -0,0 +1,10 @@ +a = int(input()) +b = int(input()) +c = int(input()) +d = int(input()) +sq1 = (a+b) % 2 +sq2 = (c+d) % 2 +if sq1 == sq2: + print("YES") +else: + print("NO") diff --git a/task_04.py b/task_04.py new file mode 100644 index 0000000..56009d0 --- /dev/null +++ b/task_04.py @@ -0,0 +1,5 @@ +n = int(input()) +if n % 4 == 0 and not n % 100 == 0 or n % 400 == 0: + print("YES") +else: + print("NO") diff --git a/task_05.py b/task_05.py new file mode 100644 index 0000000..eb4979c --- /dev/null +++ b/task_05.py @@ -0,0 +1,10 @@ +a = int(input()) +b = int(input()) +c = int(input()) + +if a <= b and a <= c: + print(a) +elif b <= a and b <= c: + print(b) +else: + print(c) diff --git a/task_06.py b/task_06.py new file mode 100644 index 0000000..7f0da54 --- /dev/null +++ b/task_06.py @@ -0,0 +1,9 @@ +a = int(input()) +b = int(input()) +c = int(input()) +if a == b and a == c: + print(3) +elif a == b and a != c or b == c and a != b or a == c and b != c: + print(2) +else: + print(0) diff --git a/task_07.py b/task_07.py new file mode 100644 index 0000000..b355d61 --- /dev/null +++ b/task_07.py @@ -0,0 +1,8 @@ +a = int(input()) +b = int(input()) +c = int(input()) +d = int(input()) +if a == c or b == d: + print("YES") +else: + print("NO") diff --git a/task_08.py b/task_08.py new file mode 100644 index 0000000..9acd603 --- /dev/null +++ b/task_08.py @@ -0,0 +1,10 @@ +x1 = int(input()) +y1 = int(input()) +x2 = int(input()) +y2 = int(input()) +stepX = (x1-x2) +stepY = (y1 - y2) +if abs(stepX) <= 1 and abs(stepY) <= 1: + print("YES") +else: + print("NO") diff --git a/task_09.py b/task_09.py new file mode 100644 index 0000000..119fa71 --- /dev/null +++ b/task_09.py @@ -0,0 +1,10 @@ +x1 = int(input()) +y1 = int(input()) +x2 = int(input()) +y2 = int(input()) +stepX = (x1-x2) +stepY = (y1 - y2) +if abs(stepX) == abs(stepY): + print('YES') +else: + print('NO') diff --git a/task_10.py b/task_10.py new file mode 100644 index 0000000..bde7929 --- /dev/null +++ b/task_10.py @@ -0,0 +1,10 @@ +x1 = int(input()) +y1 = int(input()) +x2 = int(input()) +y2 = int(input()) +stepX = (x1-x2) +stepY = (y1 - y2) +if abs(stepX) == abs(stepY) or x1 == x2 or y1 == y2: + print('YES') +else: + print('NO') diff --git a/task_11.py b/task_11.py new file mode 100644 index 0000000..1e45582 --- /dev/null +++ b/task_11.py @@ -0,0 +1,10 @@ +x1 = int(input()) +y1 = int(input()) +x2 = int(input()) +y2 = int(input()) +dx = abs(x1 - x2) +dy = abs(y1 - y2) +if dx == 1 and dy == 2 or dx == 2 and dy == 1: + print('YES') +else: + print('NO') diff --git a/task_12.py b/task_12.py new file mode 100644 index 0000000..646bf29 --- /dev/null +++ b/task_12.py @@ -0,0 +1,7 @@ +n = int(input()) +m = int(input()) +k = int(input()) +if k < n * m and ((k % n == 0) or (k % m == 0)): + print('YES') +else: + print('NO') diff --git a/task_13.py b/task_13.py new file mode 100644 index 0000000..8b1c7a7 --- /dev/null +++ b/task_13.py @@ -0,0 +1,15 @@ +n = int(input()) +m = int(input()) +x = int(input()) +y = int(input()) + +if n > m: + n, m = m, n +if x >= n / 2: + x = n - x +if y >= m / 2: + y = m - y +if x < y: + print(x) +else: + print(y)