#include <iostream>
using namespace std;
class Point
{
private:
double m_x, m_y, m_z;
public:
Point(double x = 0.0, double y = 0.0, double z = 0.0)
: m_x(x), m_y(y), m_z(z)
{}
double getX() { return m_x; }
double getY() { return m_y; }
double getZ() { return m_z; }
//void print()
//{
// cout << m_x << " " << m_y << " " << m_z << "\n";
//}
frined std::ostream& operator << (std::ostream &out, const Point &point)
{
out << point.m_x << " " << point.m_y << " " << point.m_z;
return out; // chaining 하기 위해서 return out
}
frined std::istream& operator << (std::istream &in, Point &point)
{
in >> point.m_x >> " " >> point.m_y >> " " >> point.m_z;
return in; // chaining 하기 위해서 return out
}
};
int main()
{
// Point p1(0.0, 0.1, 0.2), p2(3.4, 1.5, 2.0);
//p1.print();
//cout << " ";
//p2.print();
//cout << "\n"; 이렇게 말고 cout << p1 << " " << p2 << "\n"; 이런식으로 쓰고 싶다!
Point p1,p2;
cin >> p1 >> p2;
cout << p1 << " " << p2 << "\n"; // file stream 할 때도 그대로 적용 가능해서 편리하다.
return 0;
}