13e7c1c6c0cd5a582de919fe8c8b5d85416b9029b883f2832dc68ff3983f2978
// https://szkopul.edu.pl/problemset/problem/_L_ofixOfziXC4izFJBsVtQs/site/?key=statement
#include <bits/stdc++.h>
// #define GARY_DBG
#define GARY_LIB
constexpr int sizik = 1000 * 1001;
#define ar std::array
typedef std::vector<std::vector<int>> _kra;
void solve() {
int a, b, c;
std::cin >> a >> b >> c;
int x, y;
std::cin >> x >> y;
if (a * x + b * y == c) {
std::cout << "TAK\n";
} else {
std::cout << "NIE\n";
}
}
int32_t main() {
#ifndef GARY_DBG
std::ios_base::sync_with_stdio(0);
std::cin.tie(0);
std::cout.tie(0);
#endif
int t = 1;
// std::cin >> t;
for (; t > 0; t--) {
solve();
}
return 0;
}