<image>

Input

The input contains a single floating-point number x with exactly 6 decimal places (0 < x < 5).

Output

Output two integers separated by a single space. Each integer should be between 1 and 10, inclusive. If several solutions exist, output any of them. Solution will exist for all tests.

Examples

Input

1.200000


Output

3 2


Input

2.572479


Output

10 3


Input

4.024922


Output

9 9
#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:36777216")
using namespace std;
template <class T>
inline T &RD(T &);
template <class T>
inline void OT(const T &);
inline long long RD() {
  long long x;
  return RD(x);
}
inline double &RF(double &);
inline double RF() {
  double x;
  return RF(x);
}
inline char *RS(char *s);
inline char &RC(char &c);
inline char RC();
inline char &RC(char &c) {
  scanf(" %c", &c);
  return c;
}
inline char RC() {
  char c;
  return RC(c);
}
template <class T>
inline T &RDD(T &);
inline long long RDD() {
  long long x;
  return RDD(x);
}
template <class T0, class T1>
inline T0 &RD(T0 &x0, T1 &x1) {
  RD(x0), RD(x1);
  return x0;
}
template <class T0, class T1, class T2>
inline T0 &RD(T0 &x0, T1 &x1, T2 &x2) {
  RD(x0), RD(x1), RD(x2);
  return x0;
}
template <class T0, class T1, class T2, class T3>
inline T0 &RD(T0 &x0, T1 &x1, T2 &x2, T3 &x3) {
  RD(x0), RD(x1), RD(x2), RD(x3);
  return x0;
}
template <class T0, class T1, class T2, class T3, class T4>
inline T0 &RD(T0 &x0, T1 &x1, T2 &x2, T3 &x3, T4 &x4) {
  RD(x0), RD(x1), RD(x2), RD(x3), RD(x4);
  return x0;
}
template <class T0, class T1, class T2, class T3, class T4, class T5>
inline T0 &RD(T0 &x0, T1 &x1, T2 &x2, T3 &x3, T4 &x4, T5 &x5) {
  RD(x0), RD(x1), RD(x2), RD(x3), RD(x4), RD(x5);
  return x0;
}
template <class T0, class T1, class T2, class T3, class T4, class T5, class T6>
inline T0 &RD(T0 &x0, T1 &x1, T2 &x2, T3 &x3, T4 &x4, T5 &x5, T6 &x6) {
  RD(x0), RD(x1), RD(x2), RD(x3), RD(x4), RD(x5), RD(x6);
  return x0;
}
template <class T0, class T1>
inline void OT(const T0 &x0, const T1 &x1) {
  OT(x0), OT(x1);
}
template <class T0, class T1, class T2>
inline void OT(const T0 &x0, const T1 &x1, const T2 &x2) {
  OT(x0), OT(x1), OT(x2);
}
template <class T0, class T1, class T2, class T3>
inline void OT(const T0 &x0, const T1 &x1, const T2 &x2, const T3 &x3) {
  OT(x0), OT(x1), OT(x2), OT(x3);
}
template <class T0, class T1, class T2, class T3, class T4>
inline void OT(const T0 &x0, const T1 &x1, const T2 &x2, const T3 &x3,
               const T4 &x4) {
  OT(x0), OT(x1), OT(x2), OT(x3), OT(x4);
}
template <class T0, class T1, class T2, class T3, class T4, class T5>
inline void OT(const T0 &x0, const T1 &x1, const T2 &x2, const T3 &x3,
               const T4 &x4, const T5 &x5) {
  OT(x0), OT(x1), OT(x2), OT(x3), OT(x4), OT(x5);
}
template <class T0, class T1, class T2, class T3, class T4, class T5, class T6>
inline void OT(const T0 &x0, const T1 &x1, const T2 &x2, const T3 &x3,
               const T4 &x4, const T5 &x5, const T6 &x6) {
  OT(x0), OT(x1), OT(x2), OT(x3), OT(x4), OT(x5), OT(x6);
}
inline char &RC(char &a, char &b) {
  RC(a), RC(b);
  return a;
}
inline char &RC(char &a, char &b, char &c) {
  RC(a), RC(b), RC(c);
  return a;
}
inline char &RC(char &a, char &b, char &c, char &d) {
  RC(a), RC(b), RC(c), RC(d);
  return a;
}
inline char &RC(char &a, char &b, char &c, char &d, char &e) {
  RC(a), RC(b), RC(c), RC(d), RC(e);
  return a;
}
inline char &RC(char &a, char &b, char &c, char &d, char &e, char &f) {
  RC(a), RC(b), RC(c), RC(d), RC(e), RC(f);
  return a;
}
inline char &RC(char &a, char &b, char &c, char &d, char &e, char &f, char &g) {
  RC(a), RC(b), RC(c), RC(d), RC(e), RC(f), RC(g);
  return a;
}
inline double &RF(double &a, double &b) {
  RF(a), RF(b);
  return a;
}
inline double &RF(double &a, double &b, double &c) {
  RF(a), RF(b), RF(c);
  return a;
}
inline double &RF(double &a, double &b, double &c, double &d) {
  RF(a), RF(b), RF(c), RF(d);
  return a;
}
inline double &RF(double &a, double &b, double &c, double &d, double &e) {
  RF(a), RF(b), RF(c), RF(d), RF(e);
  return a;
}
inline double &RF(double &a, double &b, double &c, double &d, double &e,
                  double &f) {
  RF(a), RF(b), RF(c), RF(d), RF(e), RF(f);
  return a;
}
inline double &RF(double &a, double &b, double &c, double &d, double &e,
                  double &f, double &g) {
  RF(a), RF(b), RF(c), RF(d), RF(e), RF(f), RF(g);
  return a;
}
inline void RS(char *s1, char *s2) { RS(s1), RS(s2); }
inline void RS(char *s1, char *s2, char *s3) { RS(s1), RS(s2), RS(s3); }
template <class T0, class T1>
inline void RDD(T0 &a, T1 &b) {
  RDD(a), RDD(b);
}
template <class T0, class T1, class T2>
inline void RDD(T0 &a, T1 &b, T2 &c) {
  RDD(a), RDD(b), RDD(c);
}
template <class T>
inline void RST(T &A) {
  memset(A, 0, sizeof(A));
}
template <class T>
inline void FLC(T &A, int x) {
  memset(A, x, sizeof(A));
}
template <class T>
inline void CLR(T &A) {
  A.clear();
}
template <class T0, class T1>
inline void RST(T0 &A0, T1 &A1) {
  RST(A0), RST(A1);
}
template <class T0, class T1, class T2>
inline void RST(T0 &A0, T1 &A1, T2 &A2) {
  RST(A0), RST(A1), RST(A2);
}
template <class T0, class T1, class T2, class T3>
inline void RST(T0 &A0, T1 &A1, T2 &A2, T3 &A3) {
  RST(A0), RST(A1), RST(A2), RST(A3);
}
template <class T0, class T1, class T2, class T3, class T4>
inline void RST(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4) {
  RST(A0), RST(A1), RST(A2), RST(A3), RST(A4);
}
template <class T0, class T1, class T2, class T3, class T4, class T5>
inline void RST(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5) {
  RST(A0), RST(A1), RST(A2), RST(A3), RST(A4), RST(A5);
}
template <class T0, class T1, class T2, class T3, class T4, class T5, class T6>
inline void RST(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5, T6 &A6) {
  RST(A0), RST(A1), RST(A2), RST(A3), RST(A4), RST(A5), RST(A6);
}
template <class T0, class T1>
inline void FLC(T0 &A0, T1 &A1, int x) {
  FLC(A0, x), FLC(A1, x);
}
template <class T0, class T1, class T2>
inline void FLC(T0 &A0, T1 &A1, T2 &A2, int x) {
  FLC(A0, x), FLC(A1, x), FLC(A2, x);
}
template <class T0, class T1, class T2, class T3>
inline void FLC(T0 &A0, T1 &A1, T2 &A2, T3 &A3, int x) {
  FLC(A0, x), FLC(A1, x), FLC(A2, x), FLC(A3, x);
}
template <class T0, class T1, class T2, class T3, class T4>
inline void FLC(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, int x) {
  FLC(A0, x), FLC(A1, x), FLC(A2, x), FLC(A3, x), FLC(A4, x);
}
template <class T0, class T1, class T2, class T3, class T4, class T5>
inline void FLC(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5, int x) {
  FLC(A0, x), FLC(A1, x), FLC(A2, x), FLC(A3, x), FLC(A4, x), FLC(A5, x);
}
template <class T0, class T1, class T2, class T3, class T4, class T5, class T6>
inline void FLC(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5, T6 &A6, int x) {
  FLC(A0, x), FLC(A1, x), FLC(A2, x), FLC(A3, x), FLC(A4, x), FLC(A5, x),
      FLC(A6, x);
}
template <class T>
inline void CLR(priority_queue<T, vector<T>, less<T> > &Q) {
  while (!Q.empty()) Q.pop();
}
template <class T>
inline void CLR(priority_queue<T, vector<T>, greater<T> > &Q) {
  while (!Q.empty()) Q.pop();
}
template <class T>
inline void CLR(stack<T> &S) {
  while (!S.empty()) S.pop();
}
template <class T0, class T1>
inline void CLR(T0 &A0, T1 &A1) {
  CLR(A0), CLR(A1);
}
template <class T0, class T1, class T2>
inline void CLR(T0 &A0, T1 &A1, T2 &A2) {
  CLR(A0), CLR(A1), CLR(A2);
}
template <class T0, class T1, class T2, class T3>
inline void CLR(T0 &A0, T1 &A1, T2 &A2, T3 &A3) {
  CLR(A0), CLR(A1), CLR(A2), CLR(A3);
}
template <class T0, class T1, class T2, class T3, class T4>
inline void CLR(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4) {
  CLR(A0), CLR(A1), CLR(A2), CLR(A3), CLR(A4);
}
template <class T0, class T1, class T2, class T3, class T4, class T5>
inline void CLR(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5) {
  CLR(A0), CLR(A1), CLR(A2), CLR(A3), CLR(A4), CLR(A5);
}
template <class T0, class T1, class T2, class T3, class T4, class T5, class T6>
inline void CLR(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5, T6 &A6) {
  CLR(A0), CLR(A1), CLR(A2), CLR(A3), CLR(A4), CLR(A5), CLR(A6);
}
template <class T>
inline void CLR(T &A, int n) {
  for (int i = 0; i < n; ++i) CLR(A[i]);
}
template <class T>
inline bool EPT(T &a) {
  return a.empty();
}
template <class T>
inline T &SRT(T &A) {
  sort(A.begin(), A.end());
  return A;
}
template <class T, class C>
inline T &SRT(T &A, C B) {
  sort(A.begin(), A.end(), B);
  return A;
}
template <class T>
inline T &RVS(T &A) {
  reverse(A.begin(), A.end());
  return A;
}
template <class T>
inline T &UNQQ(T &A) {
  A.resize(unique(A.begin(), A.end()) - A.begin());
  return A;
}
template <class T>
inline T &UNQ(T &A) {
  SRT(A);
  return UNQQ(A);
}
const int MOD = int(1e9) + 7;
const int INF = 0x3f3f3f3f;
const long long INFF = 0x3f3f3f3f3f3f3f3fLL;
const double EPS = 1e-9;
const double OO = 1e20;
const double PI = acos(-1.0);
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
template <class T>
inline T &checkMin(T &a, const T b) {
  if (b < a) a = b;
  return a;
}
template <class T>
inline T &checkMax(T &a, const T b) {
  if (a < b) a = b;
  return a;
}
template <class T>
inline T &checkMin(T &a, T &b, const T x) {
  checkMin(a, x), checkMin(b, x);
  return a;
}
template <class T>
inline T &checkMax(T &a, T &b, const T x) {
  checkMax(a, x), checkMax(b, x);
  return a;
}
template <class T, class C>
inline T &checkMin(T &a, const T b, C c) {
  if (c(b, a)) a = b;
  return a;
}
template <class T, class C>
inline T &checkMax(T &a, const T b, C c) {
  if (c(a, b)) a = b;
  return a;
}
template <class T>
inline T min(T a, T b, T c) {
  return min(min(a, b), c);
}
template <class T>
inline T max(T a, T b, T c) {
  return max(max(a, b), c);
}
template <class T>
inline T min(T a, T b, T c, T d) {
  return min(min(a, b), min(c, d));
}
template <class T>
inline T max(T a, T b, T c, T d) {
  return max(max(a, b), max(c, d));
}
template <class T>
inline T min(T a, T b, T c, T d, T e) {
  return min(min(min(a, b), min(c, d)), e);
}
template <class T>
inline T max(T a, T b, T c, T d, T e) {
  return max(max(max(a, b), max(c, d)), e);
}
template <class T>
inline T sqr(T a) {
  return a * a;
}
template <class T>
inline T cub(T a) {
  return a * a * a;
}
template <class T>
inline T ceil(T x, T y) {
  return (x - 1) / y + 1;
}
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
inline int sgn(double x) { return x < -EPS ? -1 : x > EPS; }
inline int sgn(double x, double y) { return sgn(x - y); }
inline double cos(double a, double b, double c) {
  return (sqr(a) + sqr(b) - sqr(c)) / (2 * a * b);
}
inline double cot(double x) { return 1. / tan(x); };
inline double sec(double x) { return 1. / cos(x); };
inline double csc(double x) { return 1. / sin(x); };
namespace BO {
inline bool _1(int x, int i) { return bool(x & 1 << i); }
inline bool _1(long long x, int i) { return bool(x & 1LL << i); }
inline long long _1(int i) { return 1LL << i; }
inline long long _U(int i) { return _1(i) - 1; };
inline int reverse_bits(int x) {
  x = ((x >> 1) & 0x55555555) | ((x << 1) & 0xaaaaaaaa);
  x = ((x >> 2) & 0x33333333) | ((x << 2) & 0xcccccccc);
  x = ((x >> 4) & 0x0f0f0f0f) | ((x << 4) & 0xf0f0f0f0);
  x = ((x >> 8) & 0x00ff00ff) | ((x << 8) & 0xff00ff00);
  x = ((x >> 16) & 0x0000ffff) | ((x << 16) & 0xffff0000);
  return x;
}
inline long long reverse_bits(long long x) {
  x = ((x >> 1) & 0x5555555555555555LL) | ((x << 1) & 0xaaaaaaaaaaaaaaaaLL);
  x = ((x >> 2) & 0x3333333333333333LL) | ((x << 2) & 0xccccccccccccccccLL);
  x = ((x >> 4) & 0x0f0f0f0f0f0f0f0fLL) | ((x << 4) & 0xf0f0f0f0f0f0f0f0LL);
  x = ((x >> 8) & 0x00ff00ff00ff00ffLL) | ((x << 8) & 0xff00ff00ff00ff00LL);
  x = ((x >> 16) & 0x0000ffff0000ffffLL) | ((x << 16) & 0xffff0000ffff0000LL);
  x = ((x >> 32) & 0x00000000ffffffffLL) | ((x << 32) & 0xffffffff00000000LL);
  return x;
}
template <class T>
inline bool odd(T x) {
  return x & 1;
}
template <class T>
inline bool even(T x) {
  return !odd(x);
}
template <class T>
inline T low_bit(T x) {
  return x & -x;
}
template <class T>
inline T high_bit(T x) {
  T p = low_bit(x);
  while (p != x) x -= p, p = low_bit(x);
  return p;
}
template <class T>
inline T cover_bit(T x) {
  T p = 1;
  while (p < x) p <<= 1;
  return p;
}
template <class T>
inline int cover_idx(T x) {
  int p = 0;
  while (_1(p) < x) ++p;
  return p;
}
inline int clz(int x) { return __builtin_clz(x); }
inline int clz(long long x) { return __builtin_clzll(x); }
inline int ctz(int x) { return __builtin_ctz(x); }
inline int ctz(long long x) { return __builtin_ctzll(x); }
inline int lg2(int x) { return !x ? -1 : 31 - clz(x); }
inline int lg2(long long x) { return !x ? -1 : 63 - clz(x); }
inline int low_idx(int x) { return !x ? -1 : ctz(x); }
inline int low_idx(long long x) { return !x ? -1 : ctz(x); }
inline int high_idx(int x) { return lg2(x); }
inline int high_idx(long long x) { return lg2(x); }
inline int parity(int x) { return __builtin_parity(x); }
inline int parity(long long x) { return __builtin_parityll(x); }
inline int count_bits(int x) { return __builtin_popcount(x); }
inline int count_bits(long long x) { return __builtin_popcountll(x); }
}  // namespace BO
using namespace BO;
namespace CG {
inline double dist2(double x, double y) { return sqr(x) + sqr(y); }
struct Po {
  double x, y;
  Po(double x = 0, double y = 0) : x(x), y(y) {}
  void in() { RF(x, y); }
  void out() { printf("(%.2f,%.2f)", x, y); }
  inline friend istream &operator>>(istream &i, Po &p) {
    return i >> p.x >> p.y;
  }
  inline friend ostream &operator<<(ostream &o, Po p) {
    return o << "(" << p.x << ", " << p.y << ")";
  }
  Po operator-() const { return Po(-x, -y); }
  Po &operator+=(const Po &p) {
    x += p.x, y += p.y;
    return *this;
  }
  Po &operator-=(const Po &p) {
    x -= p.x, y -= p.y;
    return *this;
  }
  Po &operator*=(double k) {
    x *= k, y *= k;
    return *this;
  }
  Po &operator/=(double k) {
    x /= k, y /= k;
    return *this;
  }
  Po &operator*=(const Po &p) { return *this = *this * p; }
  Po &operator/=(const Po &p) { return *this = *this / p; }
  Po operator+(const Po &p) const { return Po(x + p.x, y + p.y); }
  Po operator-(const Po &p) const { return Po(x - p.x, y - p.y); }
  Po operator*(double k) const { return Po(x * k, y * k); }
  Po operator/(double k) const { return Po(x / k, y / k); }
  Po operator*(const Po &p) const {
    return Po(x * p.x - y * p.y, y * p.x + x * p.y);
  }
  Po operator/(const Po &p) const {
    return Po(x * p.x + y * p.y, y * p.x - x * p.y) / p.len2();
  }
  bool operator==(const Po &p) const { return !sgn(x, p.x) && !sgn(y, p.y); };
  bool operator!=(const Po &p) const { return sgn(x, p.x) || sgn(y, p.y); }
  bool operator<(const Po &p) const {
    return sgn(x, p.x) < 0 || !sgn(x, p.x) && sgn(y, p.y) < 0;
  }
  bool operator<=(const Po &p) const {
    return sgn(x, p.x) < 0 || !sgn(x, p.x) && sgn(y, p.y) <= 0;
  }
  bool operator>(const Po &p) const { return !(*this <= p); }
  bool operator>=(const Po &p) const { return !(*this < p); }
  double len2() const { return dist2(x, y); }
  double len() const { return sqrt(len2()); }
  double arg() const { return atan2(y, x); }
  Po &_1() { return *this /= len(); }
  Po &conj() {
    y = -y;
    return *this;
  }
  Po &lt() {
    swap(x, y), x = -x;
    return *this;
  }
  Po &rt() {
    swap(x, y), y = -y;
    return *this;
  }
  Po &rot(double a, const Po &o = Po()) {
    *this -= o;
    *this *= Po(cos(a), sin(a));
    return *this += o;
  }
};
inline double dot(double x1, double y1, double x2, double y2) {
  return x1 * x2 + y1 * y2;
}
inline double dot(const Po &a, const Po &b) { return dot(a.x, a.y, b.x, b.y); }
inline double dot(const Po &p0, const Po &p1, const Po &p2) {
  return dot(p1 - p0, p2 - p0);
}
inline double det(double x1, double y1, double x2, double y2) {
  return x1 * y2 - x2 * y1;
}
inline double det(const Po &a, const Po &b) { return det(a.x, a.y, b.x, b.y); }
inline double det(const Po &p0, const Po &p1, const Po &p2) {
  return det(p1 - p0, p2 - p0);
}
inline double ang(const Po &p0, const Po &p1) {
  return acos(dot(p0, p1) / p0.len() / p1.len());
}
inline double ang(const Po &p0, const Po &p1, const Po &p2) {
  return ang(p1 - p0, p2 - p0);
}
inline double ang(const Po &p0, const Po &p1, const Po &p2, const Po &p3) {
  return ang(p1 - p0, p3 - p2);
}
inline double dist2(const Po &a, const Po &b) {
  return dist2(a.x - b.x, a.y - b.y);
}
template <class T1, class T2>
inline int dett(const T1 &x, const T2 &y) {
  return sgn(det(x, y));
}
template <class T1, class T2, class T3>
inline int dett(const T1 &x, const T2 &y, const T3 &z) {
  return sgn(det(x, y, z));
}
template <class T1, class T2, class T3, class T4>
inline int dett(const T1 &x, const T2 &y, const T3 &z, const T4 &w) {
  return sgn(det(x, y, z, w));
}
template <class T1, class T2>
inline int dott(const T1 &x, const T2 &y) {
  return sgn(dot(x, y));
}
template <class T1, class T2, class T3>
inline int dott(const T1 &x, const T2 &y, const T3 &z) {
  return sgn(dot(x, y, z));
}
template <class T1, class T2, class T3, class T4>
inline int dott(const T1 &x, const T2 &y, const T3 &z, const T4 &w) {
  return sgn(dot(x, y, z, w));
}
template <class T1, class T2>
inline double arg(const T1 &x, const T2 &y) {
  double a = ang(x, y);
  return ~dett(x, y) ? a : 2 * PI - a;
}
template <class T1, class T2, class T3>
inline double arg(const T1 &x, const T2 &y, const T3 &z) {
  double a = ang(x, y, z);
  return ~dett(x, y, z) ? a : 2 * PI - a;
}
template <class T1, class T2, class T3, class T4>
inline double arg(const T1 &x, const T2 &y, const T3 &z, const T4 &w) {
  double a = ang(x, y, z, w);
  return ~dett(x, y, z, w) ? a : 2 * PI - a;
}
template <class T1, class T2>
inline double dist(const T1 &x, const T2 &y) {
  return sqrt(dist2(x, y));
}
template <class T1, class T2, class T3>
inline double dist(const T1 &x, const T2 &y, const T3 &z) {
  return sqrt(dist2(x, y, z));
}
inline Po _1(Po p) { return p._1(); }
inline Po conj(Po p) { return p.conj(); }
inline Po lt(Po p) { return p.lt(); }
inline Po rt(Po p) { return p.rt(); }
inline Po rot(Po p, double a, const Po &o = Po()) { return p.rot(a, o); }
inline Po operator*(double k, const Po &p) { return p * k; }
inline Po operator/(double k, const Po &p) { return conj(p) * k / p.len2(); }
struct Line {
  Po a, b;
  Line(const Po &a = Po(), const Po &b = Po()) : a(a), b(b) {}
  Line(double x0, double y0, double x1, double y1)
      : a(Po(x0, y0)), b(Po(x1, y1)) {}
  Line(const Line &l) : a(l.a), b(l.b) {}
  Line(double A, double B, double C) {
    C = -C;
    if (!::sgn(A))
      a = Po(0, C / B), b = Po(1, C / B);
    else if (!::sgn(B))
      a = Po(C / A, 0), b = Po(C / A, 1);
    else
      a = Po(0, C / B), b = Po(1, (C - A) / B);
  }
  void in() { a.in(), b.in(); }
  inline friend istream &operator>>(istream &i, Line &p) {
    return i >> p.a >> p.b;
  }
  inline friend ostream &operator<<(ostream &o, Line p) {
    return o << p.a << "-" << p.b;
  }
  Line operator+(const Po &x) const { return Line(a + x, b + x); }
  Line operator-(const Po &x) const { return Line(a - x, b - x); }
  Line operator*(double k) const { return Line(a * k, b * k); }
  Line operator/(double k) const { return Line(a / k, b / k); }
  Po operator*(const Line &) const;
  Po d() const { return b - a; }
  double len2() const { return d().len2(); }
  double len() const { return d().len(); }
  double arg() const { return d().arg(); }
  int sgn(const Po &p) const { return dett(a, b, p); }
  int sgn(const Line &) const;
  bool sameSgn(const Po &p1, const Po &p2) const { return sgn(p1) == sgn(p2); }
  void getEquation(double &K, double &B) const {
    K = ::sgn(a.x, b.x) ? (b.y - a.y) / (b.x - a.x) : OO;
    B = a.y - K * a.x;
  }
  void getEquation(double &A, double &B, double &C) const {
    A = a.y - b.y, B = b.x - a.x, C = det(a, b);
  }
  Line &push(double r) {
    Po v = d()._1().lt() * r;
    a += v, b += v;
    return *this;
  }
};
inline double dot(const Line &l1, const Line &l2) {
  return dot(l1.d(), l2.d());
}
inline double dot(const Line &l, const Po &p) { return dot(l.a, l.b, p); }
inline double dot(const Po &p, const Line &l) { return dot(p, l.a, l.b); }
inline double det(const Line &l1, const Line &l2) {
  return det(l1.d(), l2.d());
}
inline double det(const Line &l, const Po &p) { return det(l.a, l.b, p); }
inline double det(const Po &p, const Line &l) { return det(p, l.a, l.b); }
inline double ang(const Line &l0, const Line &l1) {
  return ang(l0.d(), l1.d());
}
inline double ang(const Line &l, const Po &p) { return ang(l.a, l.b, p); }
inline double ang(const Po &p, const Line &l) { return ang(p, l.a, l.b); }
inline int Line::sgn(const Line &l) const { return dett(*this, l); }
inline Po Line::operator*(const Line &l) const {
  return a + d() * det(a, l) / det(*this, l);
}
inline Po operator&(const Po &p, const Line &l) {
  return l * Line(p, p + l.d().lt());
}
inline Po operator%(const Po &p, const Line &l) { return p & l * 2 - p; }
inline Line push(Line l, double r) { return l.push(r); }
struct Seg : public Line {
  Seg(const Po &a = Po(), const Po &b = Po()) : Line(a, b) {}
  Seg(double x0, double y0, double x1, double y1) : Line(x0, y0, x1, y1) {}
  Seg(const Line &l) : Line(l) {}
  Seg(const Po &a, double alpha) : Line(a, alpha) {}
  Seg(double A, double B, double C) : Line(A, B, C) {}
  inline int sgn(const Po &p) const;
  inline int sgn(const Line &l) const;
  inline bool qrt(const Seg &l) const;
  inline int sgn(const Seg &l) const;
};
inline int Seg::sgn(const Po &p) const { return -dott(p, a, b); }
inline int Seg::sgn(const Line &l) const { return sgn(*this * l); }
inline bool Seg::qrt(const Seg &l) const {
  return min(a.x, b.x) <= max(l.a.x, l.b.x) &&
         min(l.a.x, l.b.x) <= max(a.x, b.x) &&
         min(a.y, b.y) <= max(l.a.y, l.b.y) &&
         min(l.a.y, l.b.y) <= max(a.y, b.y);
}
inline int Seg::sgn(const Seg &l) const {
  if (!qrt(l)) return -1;
  int d1 = dett(a, b, l.a), d2 = dett(a, b, l.b), d3 = dett(l.a, l.b, a),
      d4 = dett(l.a, l.b, b);
  if ((d1 ^ d2) == -2 && (d3 ^ d4) == -2) return 1;
  return ((!d1 && dott(l.a - a, l.a - b) <= 0) ||
          (!d2 && dott(l.b - a, l.b - b) <= 0) ||
          (!d3 && dott(a - l.a, a - l.b) <= 0) ||
          (!d4 && dott(b - l.a, b - l.b) <= 0))
             ? 0
             : -1;
}
inline double dist2(const Line &l, const Po &p) {
  return sqr(fabs(det(l.d(), p - l.a))) / l.len2();
}
inline double dist2(const Line &l1, const Line &l2) {
  return dett(l1, l2) ? 0 : dist2(l1, l2.a);
}
inline double dist2(const Seg &l, const Po &p) {
  Po pa = p - l.a, pb = p - l.b;
  if (dott(l.d(), pa) <= 0) return pa.len2();
  if (dott(l.d(), pb) >= 0) return pb.len2();
  return dist2(Line(l), p);
}
inline double dist2(const Seg &s, const Line &l) {
  Po v1 = s.a - l.a, v2 = s.b - l.a;
  double d1 = det(l.d(), v1), d2 = det(l.d(), v2);
  return sgn(d1) != sgn(d2) ? 0 : sqr(min(fabs(d1), fabs(d2))) / l.len2();
}
inline double dist2(const Seg &l1, const Seg &l2) {
  if (~l1.sgn(l2))
    return 0;
  else
    return min(dist2(l2, l1.a), dist2(l2, l1.b), dist2(l1, l2.a),
               dist2(l1, l2.b));
}
template <class T1, class T2>
inline double dist2(const T1 &a, const T2 &b) {
  return dist2(b, a);
}
const double eps = 1e-6;
const double pi = acos(-1.0);
const double inf = 1e20;
const int maxp = 1e4 + 9;
int dblcmp(double d) {
  if (fabs(d) < eps) return 0;
  return d > eps ? 1 : -1;
}
inline double sqr(double x) { return x * x; }
struct Po3D {
  double x, y, z;
  Po3D() {}
  Po3D(double _x, double _y, double _z) : x(_x), y(_y), z(_z){};
  void input() { scanf("%lf%lf%lf", &x, &y, &z); }
  void output() { printf("%.2lf %.2lf %.2lf\n", x, y, z); }
  bool operator==(Po3D a) {
    return dblcmp(a.x - x) == 0 && dblcmp(a.y - y) == 0 && dblcmp(a.z - z) == 0;
  }
  bool operator<(Po3D a) const {
    return dblcmp(a.x - x) == 0
               ? dblcmp(y - a.y) == 0 ? dblcmp(z - a.z) < 0 : y < a.y
               : x < a.x;
  }
  double len() { return sqrt(len2()); }
  double len2() { return x * x + y * y + z * z; }
  double distance(Po3D p) {
    return sqrt((p.x - x) * (p.x - x) + (p.y - y) * (p.y - y) +
                (p.z - z) * (p.z - z));
  }
  Po3D add(Po3D p) { return Po3D(x + p.x, y + p.y, z + p.z); }
  Po3D sub(Po3D p) { return Po3D(x - p.x, y - p.y, z - p.z); }
  Po3D operator+(const Po3D &p) const {
    return Po3D(x + p.x, y + p.y, z + p.z);
  }
  Po3D operator-(const Po3D &p) const {
    return Po3D(x - p.x, y - p.y, z - p.z);
  }
  Po3D mul(double d) { return Po3D(x * d, y * d, z * d); }
  Po3D div(double d) { return Po3D(x / d, y / d, z / d); }
  double dot(Po3D p) { return x * p.x + y * p.y + z * p.z; }
  double operator*(const Po3D &p) const { return x * p.x + y * p.y + z * p.z; }
  Po3D det(Po3D p) {
    return Po3D(y * p.z - p.y * z, p.x * z - x * p.z, x * p.y - p.x * y);
  }
  Po3D operator^(const Po3D &p) const {
    return Po3D(y * p.z - p.y * z, p.x * z - x * p.z, x * p.y - p.x * y);
  }
  double rad(Po3D a, Po3D b) {
    Po3D p = (*this);
    return acos(a.sub(p).dot(b.sub(p)) / (a.distance(p) * b.distance(p)));
  }
  Po3D trunc(double r) {
    r /= len();
    return Po3D(x * r, y * r, z * r);
  }
};
struct line3 {
  Po3D a, b;
  line3() {}
  line3(Po3D _a, Po3D _b) {
    a = _a;
    b = _b;
  }
  bool operator==(line3 v) { return (a == v.a) && (b == v.b); }
  void input() {
    a.input();
    b.input();
  }
  double length() { return a.distance(b); }
  bool pointonseg(Po3D p) {
    return dblcmp(p.sub(a).det(p.sub(b)).len()) == 0 &&
           dblcmp(a.sub(p).dot(b.sub(p))) <= 0;
  }
  double dispointtoline(Po3D p) {
    return b.sub(a).det(p.sub(a)).len() / a.distance(b);
  }
  double dispointtoseg(Po3D p) {
    if (dblcmp(p.sub(b).dot(a.sub(b))) < 0 ||
        dblcmp(p.sub(a).dot(b.sub(a))) < 0) {
      return min(p.distance(a), p.distance(b));
    }
    return dispointtoline(p);
  }
  Po3D lineprog(Po3D p) {
    return a.add(b.sub(a).trunc(b.sub(a).dot(p.sub(a)) / b.distance(a)));
  }
  Po3D rotate(Po3D p, double ang) {
    if (dblcmp((p.sub(a).det(p.sub(b)).len())) == 0) return p;
    Po3D f1 = b.sub(a).det(p.sub(a));
    Po3D f2 = b.sub(a).det(f1);
    double len = fabs(a.sub(p).det(b.sub(p)).len() / a.distance(b));
    f1 = f1.trunc(len);
    f2 = f2.trunc(len);
    Po3D h = p.add(f2);
    Po3D pp = h.add(f1);
    return h.add((p.sub(h)).mul(cos(ang * 1.0)))
        .add((pp.sub(h)).mul(sin(ang * 1.0)));
  }
};
struct plane {
  Po3D a, b, c, o;
  plane() {}
  plane(Po3D _a, Po3D _b, Po3D _c) {
    a = _a;
    b = _b;
    c = _c;
    o = pvec();
  }
  plane(double _a, double _b, double _c, double _d) {
    o = Po3D(_a, _b, _c);
    if (dblcmp(_a) != 0) {
      a = Po3D((-_d - _c - _b) / _a, 1, 1);
    } else if (dblcmp(_b) != 0) {
      a = Po3D(1, (-_d - _c - _a) / _b, 1);
    } else if (dblcmp(_c) != 0) {
      a = Po3D(1, 1, (-_d - _a - _b) / _c);
    }
  }
  void input() {
    a.input();
    b.input();
    c.input();
    o = pvec();
  }
  Po3D pvec() { return b.sub(a).det(c.sub(a)); }
  bool pointonplane(Po3D p) { return dblcmp(p.sub(a).dot(o)) == 0; }
  int pointontriangle(Po3D p) {
    if (!pointonplane(p)) return 0;
    double s = a.sub(b).det(c.sub(b)).len();
    double s1 = p.sub(a).det(p.sub(b)).len();
    double s2 = p.sub(a).det(p.sub(c)).len();
    double s3 = p.sub(b).det(p.sub(c)).len();
    if (dblcmp(s - s1 - s2 - s3)) return 0;
    if (dblcmp(s1) && dblcmp(s2) && dblcmp(s3)) return 2;
    return 1;
  }
  bool relationplane(plane f) {
    if (dblcmp(o.det(f.o).len())) {
      if (dblcmp(pvec().dot(f.pvec())) == 0) return -1;
      return 0;
    }
    if (pointonplane(f.a)) return 2;
    return 1;
  }
  double angleplane(plane f) {
    return acos(o.dot(f.o) / (o.len() * f.o.len()));
  }
  double dispoint(Po3D p) { return fabs(p.sub(a).dot(o) / o.len()); }
  Po3D pttoplane(Po3D p) {
    line3 u = line3(p, p.add(o));
    crossline(u, p);
    return p;
  }
  int crossline(line3 u, Po3D &p) {
    double x = o.dot(u.b.sub(a));
    double y = o.dot(u.a.sub(a));
    double d = x - y;
    if (dblcmp(fabs(d)) == 0) return 0;
    p = u.a.mul(x).sub(u.b.mul(y)).div(d);
    return 1;
  }
  int crossplane(plane f, line3 &u) {
    Po3D oo = o.det(f.o);
    Po3D v = o.det(oo);
    double d = fabs(f.o.dot(v));
    if (dblcmp(d) == 0) return 0;
    Po3D q = a.add(v.mul(f.o.dot(f.a.sub(a)) / d));
    u = line3(q, q.add(oo));
    return 1;
  }
};
Po3D xmult(Po3D u, Po3D v) {
  Po3D ret;
  ret.x = u.y * v.z - v.y * u.z;
  ret.y = u.z * v.x - u.x * v.z;
  ret.z = u.x * v.y - u.y * v.x;
  return ret;
}
double dmult(Po3D u, Po3D v) { return u.x * v.x + u.y * v.y + u.z * v.z; }
Po3D subt(Po3D u, Po3D v) {
  Po3D ret;
  ret.x = u.x - v.x;
  ret.y = u.y - v.y;
  ret.z = u.z - v.z;
  return ret;
}
Po3D pvec(plane s) { return xmult(subt(s.a, s.b), subt(s.b, s.c)); }
Po3D pvec(Po3D s1, Po3D s2, Po3D s3) {
  return xmult(subt(s1, s2), subt(s2, s3));
}
double dist(Po3D p1, Po3D p2) {
  return sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y) +
              (p1.z - p2.z) * (p1.z - p2.z));
}
double vlen(Po3D p) { return sqrt(p.x * p.x + p.y * p.y + p.z * p.z); }
int dots_inline(Po3D p1, Po3D p2, Po3D p3) {
  return vlen(xmult(subt(p1, p2), subt(p2, p3))) < eps;
}
int dots_onplane(Po3D a, Po3D b, Po3D c, Po3D d) {
  return (((dmult(pvec(a, b, c), subt(d, a))) > 0
               ? (dmult(pvec(a, b, c), subt(d, a)))
               : -(dmult(pvec(a, b, c), subt(d, a)))) < eps);
}
int dot_online_in(Po3D p, line3 l) {
  return (((vlen(xmult(subt(p, l.a), subt(p, l.b)))) > 0
               ? (vlen(xmult(subt(p, l.a), subt(p, l.b))))
               : -(vlen(xmult(subt(p, l.a), subt(p, l.b))))) < eps) &&
         (l.a.x - p.x) * (l.b.x - p.x) < eps &&
         (l.a.y - p.y) * (l.b.y - p.y) < eps &&
         (l.a.z - p.z) * (l.b.z - p.z) < eps;
}
int dot_online_in(Po3D p, Po3D l1, Po3D l2) {
  return (((vlen(xmult(subt(p, l1), subt(p, l2)))) > 0
               ? (vlen(xmult(subt(p, l1), subt(p, l2))))
               : -(vlen(xmult(subt(p, l1), subt(p, l2))))) < eps) &&
         (l1.x - p.x) * (l2.x - p.x) < eps &&
         (l1.y - p.y) * (l2.y - p.y) < eps && (l1.z - p.z) * (l2.z - p.z) < eps;
}
int dot_online_ex(Po3D p, line3 l) {
  return dot_online_in(p, l) &&
         (!(((p.x - l.a.x) > 0 ? (p.x - l.a.x) : -(p.x - l.a.x)) < eps) ||
          !(((p.y - l.a.y) > 0 ? (p.y - l.a.y) : -(p.y - l.a.y)) < eps) ||
          !(((p.z - l.a.z) > 0 ? (p.z - l.a.z) : -(p.z - l.a.z)) < eps)) &&
         (!(((p.x - l.b.x) > 0 ? (p.x - l.b.x) : -(p.x - l.b.x)) < eps) ||
          !(((p.y - l.b.y) > 0 ? (p.y - l.b.y) : -(p.y - l.b.y)) < eps) ||
          !(((p.z - l.b.z) > 0 ? (p.z - l.b.z) : -(p.z - l.b.z)) < eps));
}
int dot_online_ex(Po3D p, Po3D l1, Po3D l2) {
  return dot_online_in(p, l1, l2) &&
         (!(((p.x - l1.x) > 0 ? (p.x - l1.x) : -(p.x - l1.x)) < eps) ||
          !(((p.y - l1.y) > 0 ? (p.y - l1.y) : -(p.y - l1.y)) < eps) ||
          !(((p.z - l1.z) > 0 ? (p.z - l1.z) : -(p.z - l1.z)) < eps)) &&
         (!(((p.x - l2.x) > 0 ? (p.x - l2.x) : -(p.x - l2.x)) < eps) ||
          !(((p.y - l2.y) > 0 ? (p.y - l2.y) : -(p.y - l2.y)) < eps) ||
          !(((p.z - l2.z) > 0 ? (p.z - l2.z) : -(p.z - l2.z)) < eps));
}
int dot_inplane_in(Po3D p, plane s) {
  return (((vlen(xmult(subt(s.a, s.b), subt(s.a, s.c))) -
            vlen(xmult(subt(p, s.a), subt(p, s.b))) -
            vlen(xmult(subt(p, s.b), subt(p, s.c))) -
            vlen(xmult(subt(p, s.c), subt(p, s.a)))) > 0
               ? (vlen(xmult(subt(s.a, s.b), subt(s.a, s.c))) -
                  vlen(xmult(subt(p, s.a), subt(p, s.b))) -
                  vlen(xmult(subt(p, s.b), subt(p, s.c))) -
                  vlen(xmult(subt(p, s.c), subt(p, s.a))))
               : -(vlen(xmult(subt(s.a, s.b), subt(s.a, s.c))) -
                   vlen(xmult(subt(p, s.a), subt(p, s.b))) -
                   vlen(xmult(subt(p, s.b), subt(p, s.c))) -
                   vlen(xmult(subt(p, s.c), subt(p, s.a))))) < eps);
}
int dot_inplane_in(Po3D p, Po3D s1, Po3D s2, Po3D s3) {
  return (((vlen(xmult(subt(s1, s2), subt(s1, s3))) -
            vlen(xmult(subt(p, s1), subt(p, s2))) -
            vlen(xmult(subt(p, s2), subt(p, s3))) -
            vlen(xmult(subt(p, s3), subt(p, s1)))) > 0
               ? (vlen(xmult(subt(s1, s2), subt(s1, s3))) -
                  vlen(xmult(subt(p, s1), subt(p, s2))) -
                  vlen(xmult(subt(p, s2), subt(p, s3))) -
                  vlen(xmult(subt(p, s3), subt(p, s1))))
               : -(vlen(xmult(subt(s1, s2), subt(s1, s3))) -
                   vlen(xmult(subt(p, s1), subt(p, s2))) -
                   vlen(xmult(subt(p, s2), subt(p, s3))) -
                   vlen(xmult(subt(p, s3), subt(p, s1))))) < eps);
}
int dot_inplane_ex(Po3D p, plane s) {
  return dot_inplane_in(p, s) &&
         vlen(xmult(subt(p, s.a), subt(p, s.b))) > eps &&
         vlen(xmult(subt(p, s.b), subt(p, s.c))) > eps &&
         vlen(xmult(subt(p, s.c), subt(p, s.a))) > eps;
}
int dot_inplane_ex(Po3D p, Po3D s1, Po3D s2, Po3D s3) {
  return dot_inplane_in(p, s1, s2, s3) &&
         vlen(xmult(subt(p, s1), subt(p, s2))) > eps &&
         vlen(xmult(subt(p, s2), subt(p, s3))) > eps &&
         vlen(xmult(subt(p, s3), subt(p, s1))) > eps;
}
int same_side(Po3D p1, Po3D p2, line3 l) {
  return dmult(xmult(subt(l.a, l.b), subt(p1, l.b)),
               xmult(subt(l.a, l.b), subt(p2, l.b))) > eps;
}
int same_side(Po3D p1, Po3D p2, Po3D l1, Po3D l2) {
  return dmult(xmult(subt(l1, l2), subt(p1, l2)),
               xmult(subt(l1, l2), subt(p2, l2))) > eps;
}
int opposite_side(Po3D p1, Po3D p2, line3 l) {
  return dmult(xmult(subt(l.a, l.b), subt(p1, l.b)),
               xmult(subt(l.a, l.b), subt(p2, l.b))) < -eps;
}
int opposite_side(Po3D p1, Po3D p2, Po3D l1, Po3D l2) {
  return dmult(xmult(subt(l1, l2), subt(p1, l2)),
               xmult(subt(l1, l2), subt(p2, l2))) < -eps;
}
int same_side(Po3D p1, Po3D p2, plane s) {
  return dmult(pvec(s), subt(p1, s.a)) * dmult(pvec(s), subt(p2, s.a)) > eps;
}
int same_side(Po3D p1, Po3D p2, Po3D s1, Po3D s2, Po3D s3) {
  return dmult(pvec(s1, s2, s3), subt(p1, s1)) *
             dmult(pvec(s1, s2, s3), subt(p2, s1)) >
         eps;
}
int opposite_side(Po3D p1, Po3D p2, plane s) {
  return dmult(pvec(s), subt(p1, s.a)) * dmult(pvec(s), subt(p2, s.a)) < -eps;
}
int opposite_side(Po3D p1, Po3D p2, Po3D s1, Po3D s2, Po3D s3) {
  return dmult(pvec(s1, s2, s3), subt(p1, s1)) *
             dmult(pvec(s1, s2, s3), subt(p2, s1)) <
         -eps;
}
int parallel(line3 u, line3 v) {
  return vlen(xmult(subt(u.a, u.b), subt(v.a, v.b))) < eps;
}
int parallel(Po3D u1, Po3D u2, Po3D v1, Po3D v2) {
  return vlen(xmult(subt(u1, u2), subt(v1, v2))) < eps;
}
int parallel(plane u, plane v) { return vlen(xmult(pvec(u), pvec(v))) < eps; }
int parallel(Po3D u1, Po3D u2, Po3D u3, Po3D v1, Po3D v2, Po3D v3) {
  return vlen(xmult(pvec(u1, u2, u3), pvec(v1, v2, v3))) < eps;
}
int parallel(line3 l, plane s) {
  return (((dmult(subt(l.a, l.b), pvec(s))) > 0
               ? (dmult(subt(l.a, l.b), pvec(s)))
               : -(dmult(subt(l.a, l.b), pvec(s)))) < eps);
}
int parallel(Po3D l1, Po3D l2, Po3D s1, Po3D s2, Po3D s3) {
  return (((dmult(subt(l1, l2), pvec(s1, s2, s3))) > 0
               ? (dmult(subt(l1, l2), pvec(s1, s2, s3)))
               : -(dmult(subt(l1, l2), pvec(s1, s2, s3)))) < eps);
}
int perpendicular(line3 u, line3 v) {
  return (((dmult(subt(u.a, u.b), subt(v.a, v.b))) > 0
               ? (dmult(subt(u.a, u.b), subt(v.a, v.b)))
               : -(dmult(subt(u.a, u.b), subt(v.a, v.b)))) < eps);
}
int perpendicular(Po3D u1, Po3D u2, Po3D v1, Po3D v2) {
  return (((dmult(subt(u1, u2), subt(v1, v2))) > 0
               ? (dmult(subt(u1, u2), subt(v1, v2)))
               : -(dmult(subt(u1, u2), subt(v1, v2)))) < eps);
}
int perpendicular(plane u, plane v) {
  return (((dmult(pvec(u), pvec(v))) > 0 ? (dmult(pvec(u), pvec(v)))
                                         : -(dmult(pvec(u), pvec(v)))) < eps);
}
int perpendicular(Po3D u1, Po3D u2, Po3D u3, Po3D v1, Po3D v2, Po3D v3) {
  return (((dmult(pvec(u1, u2, u3), pvec(v1, v2, v3))) > 0
               ? (dmult(pvec(u1, u2, u3), pvec(v1, v2, v3)))
               : -(dmult(pvec(u1, u2, u3), pvec(v1, v2, v3)))) < eps);
}
int perpendicular(line3 l, plane s) {
  return vlen(xmult(subt(l.a, l.b), pvec(s))) < eps;
}
int perpendicular(Po3D l1, Po3D l2, Po3D s1, Po3D s2, Po3D s3) {
  return vlen(xmult(subt(l1, l2), pvec(s1, s2, s3))) < eps;
}
int intersect_in(line3 u, line3 v) {
  if (!dots_onplane(u.a, u.b, v.a, v.b)) return 0;
  if (!dots_inline(u.a, u.b, v.a) || !dots_inline(u.a, u.b, v.b))
    return !same_side(u.a, u.b, v) && !same_side(v.a, v.b, u);
  return dot_online_in(u.a, v) || dot_online_in(u.b, v) ||
         dot_online_in(v.a, u) || dot_online_in(v.b, u);
}
int intersect_in(Po3D u1, Po3D u2, Po3D v1, Po3D v2) {
  if (!dots_onplane(u1, u2, v1, v2)) return 0;
  if (!dots_inline(u1, u2, v1) || !dots_inline(u1, u2, v2))
    return !same_side(u1, u2, v1, v2) && !same_side(v1, v2, u1, u2);
  return dot_online_in(u1, v1, v2) || dot_online_in(u2, v1, v2) ||
         dot_online_in(v1, u1, u2) || dot_online_in(v2, u1, u2);
}
int intersect_ex(line3 u, line3 v) {
  return dots_onplane(u.a, u.b, v.a, v.b) && opposite_side(u.a, u.b, v) &&
         opposite_side(v.a, v.b, u);
}
int intersect_ex(Po3D u1, Po3D u2, Po3D v1, Po3D v2) {
  return dots_onplane(u1, u2, v1, v2) && opposite_side(u1, u2, v1, v2) &&
         opposite_side(v1, v2, u1, u2);
}
int intersect_in(line3 l, plane s) {
  return !same_side(l.a, l.b, s) && !same_side(s.a, s.b, l.a, l.b, s.c) &&
         !same_side(s.b, s.c, l.a, l.b, s.a) &&
         !same_side(s.c, s.a, l.a, l.b, s.b);
}
int intersect_in(Po3D l1, Po3D l2, Po3D s1, Po3D s2, Po3D s3) {
  return !same_side(l1, l2, s1, s2, s3) && !same_side(s1, s2, l1, l2, s3) &&
         !same_side(s2, s3, l1, l2, s1) && !same_side(s3, s1, l1, l2, s2);
}
int intersect_ex(line3 l, plane s) {
  return opposite_side(l.a, l.b, s) && opposite_side(s.a, s.b, l.a, l.b, s.c) &&
         opposite_side(s.b, s.c, l.a, l.b, s.a) &&
         opposite_side(s.c, s.a, l.a, l.b, s.b);
}
int intersect_ex(Po3D l1, Po3D l2, Po3D s1, Po3D s2, Po3D s3) {
  return opposite_side(l1, l2, s1, s2, s3) &&
         opposite_side(s1, s2, l1, l2, s3) &&
         opposite_side(s2, s3, l1, l2, s1) && opposite_side(s3, s1, l1, l2, s2);
}
Po3D intersection(line3 u, line3 v) {
  Po3D ret = u.a;
  double t =
      ((u.a.x - v.a.x) * (v.a.y - v.b.y) - (u.a.y - v.a.y) * (v.a.x - v.b.x)) /
      ((u.a.x - u.b.x) * (v.a.y - v.b.y) - (u.a.y - u.b.y) * (v.a.x - v.b.x));
  ret.x += (u.b.x - u.a.x) * t;
  ret.y += (u.b.y - u.a.y) * t;
  ret.z += (u.b.z - u.a.z) * t;
  return ret;
}
Po3D intersection(Po3D u1, Po3D u2, Po3D v1, Po3D v2) {
  Po3D ret = u1;
  double t = ((u1.x - v1.x) * (v1.y - v2.y) - (u1.y - v1.y) * (v1.x - v2.x)) /
             ((u1.x - u2.x) * (v1.y - v2.y) - (u1.y - u2.y) * (v1.x - v2.x));
  ret.x += (u2.x - u1.x) * t;
  ret.y += (u2.y - u1.y) * t;
  ret.z += (u2.z - u1.z) * t;
  return ret;
}
Po3D intersection(line3 l, plane s) {
  Po3D ret = pvec(s);
  double t = (ret.x * (s.a.x - l.a.x) + ret.y * (s.a.y - l.a.y) +
              ret.z * (s.a.z - l.a.z)) /
             (ret.x * (l.b.x - l.a.x) + ret.y * (l.b.y - l.a.y) +
              ret.z * (l.b.z - l.a.z));
  ret.x = l.a.x + (l.b.x - l.a.x) * t;
  ret.y = l.a.y + (l.b.y - l.a.y) * t;
  ret.z = l.a.z + (l.b.z - l.a.z) * t;
  return ret;
}
Po3D intersection(Po3D l1, Po3D l2, Po3D s1, Po3D s2, Po3D s3) {
  Po3D ret = pvec(s1, s2, s3);
  double t =
      (ret.x * (s1.x - l1.x) + ret.y * (s1.y - l1.y) + ret.z * (s1.z - l1.z)) /
      (ret.x * (l2.x - l1.x) + ret.y * (l2.y - l1.y) + ret.z * (l2.z - l1.z));
  ret.x = l1.x + (l2.x - l1.x) * t;
  ret.y = l1.y + (l2.y - l1.y) * t;
  ret.z = l1.z + (l2.z - l1.z) * t;
  return ret;
}
line3 intersection(plane u, plane v) {
  line3 ret;
  ret.a = parallel(v.a, v.b, u.a, u.b, u.c)
              ? intersection(v.b, v.c, u.a, u.b, u.c)
              : intersection(v.a, v.b, u.a, u.b, u.c);
  ret.b = parallel(v.c, v.a, u.a, u.b, u.c)
              ? intersection(v.b, v.c, u.a, u.b, u.c)
              : intersection(v.c, v.a, u.a, u.b, u.c);
  return ret;
}
line3 intersection(Po3D u1, Po3D u2, Po3D u3, Po3D v1, Po3D v2, Po3D v3) {
  line3 ret;
  ret.a = parallel(v1, v2, u1, u2, u3) ? intersection(v2, v3, u1, u2, u3)
                                       : intersection(v1, v2, u1, u2, u3);
  ret.b = parallel(v3, v1, u1, u2, u3) ? intersection(v2, v3, u1, u2, u3)
                                       : intersection(v3, v1, u1, u2, u3);
  return ret;
}
double ptoline(Po3D p, line3 l) {
  return vlen(xmult(subt(p, l.a), subt(l.b, l.a))) / dist(l.a, l.b);
}
double ptoline(Po3D p, Po3D l1, Po3D l2) {
  return vlen(xmult(subt(p, l1), subt(l2, l1))) / dist(l1, l2);
}
double ptoplane(Po3D p, plane s) {
  return fabs(dmult(pvec(s), subt(p, s.a))) / vlen(pvec(s));
}
double ptoplane(Po3D p, Po3D s1, Po3D s2, Po3D s3) {
  return fabs(dmult(pvec(s1, s2, s3), subt(p, s1))) / vlen(pvec(s1, s2, s3));
}
double linetoline(line3 u, line3 v) {
  Po3D n = xmult(subt(u.a, u.b), subt(v.a, v.b));
  return fabs(dmult(subt(u.a, v.a), n)) / vlen(n);
}
double linetoline(Po3D u1, Po3D u2, Po3D v1, Po3D v2) {
  Po3D n = xmult(subt(u1, u2), subt(v1, v2));
  return fabs(dmult(subt(u1, v1), n)) / vlen(n);
}
double angle_cos(line3 u, line3 v) {
  return dmult(subt(u.a, u.b), subt(v.a, v.b)) / vlen(subt(u.a, u.b)) /
         vlen(subt(v.a, v.b));
}
double angle_cos(Po3D u1, Po3D u2, Po3D v1, Po3D v2) {
  return dmult(subt(u1, u2), subt(v1, v2)) / vlen(subt(u1, u2)) /
         vlen(subt(v1, v2));
}
double angle_cos(plane u, plane v) {
  return dmult(pvec(u), pvec(v)) / vlen(pvec(u)) / vlen(pvec(v));
}
double angle_cos(Po3D u1, Po3D u2, Po3D u3, Po3D v1, Po3D v2, Po3D v3) {
  return dmult(pvec(u1, u2, u3), pvec(v1, v2, v3)) / vlen(pvec(u1, u2, u3)) /
         vlen(pvec(v1, v2, v3));
}
double angle_sin(line3 l, plane s) {
  return dmult(subt(l.a, l.b), pvec(s)) / vlen(subt(l.a, l.b)) / vlen(pvec(s));
}
double angle_sin(Po3D l1, Po3D l2, Po3D s1, Po3D s2, Po3D s3) {
  return dmult(subt(l1, l2), pvec(s1, s2, s3)) / vlen(subt(l1, l2)) /
         vlen(pvec(s1, s2, s3));
}
}  // namespace CG
using namespace CG;
template <class T>
inline T &RD(T &x) {
  char c;
  while (!isdigit((c = getchar())))
    ;
  x = c - '0';
  while (isdigit((c = getchar()))) x = x * 10 + c - '0';
  return x;
}
template <class T>
inline T &RDD(T &x) {
  char c;
  while ((c = getchar()), c != '-' && !isdigit(c))
    ;
  if (c == '-') {
    x = '0' - (c = getchar());
    while (isdigit((c = getchar()))) x = x * 10 + '0' - c;
  } else {
    x = c - '0';
    while (isdigit((c = getchar()))) x = x * 10 + c - '0';
  }
  return x;
}
inline double &RF(double &x) {
  char c;
  while ((c = getchar()), c != '-' && c != '.' && !isdigit(c))
    ;
  if (c == '-')
    if ((c = getchar()) == '.') {
      x = 0;
      double l = 1;
      while (isdigit((c = getchar()))) l /= 10, x = x * 10 + '0' - c;
      x *= l;
    } else {
      x = '0' - c;
      while (isdigit((c = getchar()))) x = x * 10 + '0' - c;
      if (c == '.') {
        double l = 1;
        while (isdigit((c = getchar()))) l /= 10, x = x * 10 + '0' - c;
        x *= l;
      }
    }
  else if (c == '.') {
    x = 0;
    double l = 1;
    while (isdigit((c = getchar()))) l /= 10, x = x * 10 + c - '0';
    x *= l;
  } else {
    x = c - '0';
    while (isdigit((c = getchar()))) x = x * 10 + c - '0';
    if (c == '.') {
      double l = 1;
      while (isdigit((c = getchar()))) l /= 10, x = x * 10 + c - '0';
      x *= l;
    }
  }
  return x;
}
inline char *RS(char *s) {
  scanf("%s", s);
  return s;
}
long long last_ans;
int Case;
template <class T>
inline void OT(const T &x) {
  printf("%d\n", x);
}
double check(double a, double h) {
  Po3D A = Po3D(0, 0, 0);
  Po3D B = Po3D(0, a, 0);
  Po3D C = Po3D(a / (2.), a / (2.), h);
  plane p = plane(A, B, C);
  Po3D O = Po3D(a / (2.), a / (2.), 0);
  double r = ptoplane(O, p);
  double res = 1. / 3 * a * a * h - 4. / 3 * pi * r * r * r;
  return r;
}
int main() {
  double x;
  cin >> x;
  int a, b;
  double ans = 1e9;
  for (int i = 1; i <= 10; ++i)
    for (int j = 1; j <= 10; ++j) {
      if (dblcmp(check(i, j) - x) == 0) {
        cout << i << ' ' << j << endl;
        return 0;
      }
    }
  cout << a << ' ' << b << endl;
}
