#include #define VARNAME(x) #x #define show(x) cerr << #x << " = " << x << endl using namespace std; using ll = __int128_t; using ld = long double; template ostream& operator<<(ostream& os, const vector& v) { os << "sz:" << v.size() << "\n["; for (const auto& p : v) { os << p << ","; } os << "]\n"; return os; } template ostream& operator<<(ostream& os, const pair& p) { os << "(" << p.first << "," << p.second << ")"; return os; } constexpr ll MOD = (ll)1e9 + 7LL; constexpr ld PI = static_cast(3.1415926535898); template constexpr T INF = numeric_limits::max() / 10; struct Vec { ll dx; ll dy; ll dz; ll dot(const Vec& v) { return (dx * v.dx + dy * v.dy + dz * v.dz); } }; int main() { cin.tie(0); ios::sync_with_stdio(false); long long x1_, y1_, z1_, x2_, y2_, z2_, x3_, y3_, z3_, x4_, y4_, z4_; cin >> x1_ >> y1_ >> z1_ >> x2_ >> y2_ >> z2_ >> x3_ >> y3_ >> z3_ >> x4_ >> y4_ >> z4_; const ll x1 = x1_; const ll y1 = y1_; const ll z1 = z1_; const ll x2 = x2_; const ll y2 = y2_; const ll z2 = z2_; const ll x3 = x3_; const ll y3 = y3_; const ll z3 = z3_; const ll x4 = x4_; const ll y4 = y4_; const ll z4 = z4_; Vec v1{x2 - x1, y2 - y1, z2 - z1}; Vec v2{x3 - x1, y3 - y1, z3 - z1}; Vec v3{x4 - x1, y4 - y1, z4 - z1}; const ll ab = v1.dot(v2); const ll n1 = v1.dot(v1); const ll n2 = v2.dot(v2); const ll ac = v1.dot(v3); const ll bc = v2.dot(v3); const ll x = n2 * ac - ab * bc; const ll y = -ab * ac + n1 * bc; cout << (x > 0 and y > 0 and x + y < n1 * n2 - ab * ab ? "YES" : "NO") << endl; return 0; }