#include <math.h>
using namespace std;

#ifndef _CVector2_hpp_
#define _CVector2_hpp_

class CVector
{
      public:
             int x;
             int y;

             CVector ()
             {
                      x = 0;
                      y = 0;
             }
 
             ~CVector(){}
             
             CVector (int r1, int r2)
             {
                      x = r1;
                      y = r2;
             }

             void set(int r1, int r2)
             {
                      x = r1;
                      y = r2;
             }
             
             CVector operator+ (CVector r)
             {
                     
                     x = x + r.x;
                     y = y + r.y;
                     
                     return (*this);
             }
             CVector operator- (CVector r)
             {
                     x = x - r.x;
                     y = y - r.y;
                     
                     return (*this);             }

             int operator* (CVector r)
             {            
                     return (x*r.x + y*r.y);
             }
                                                                                                  
             void printv()
             {
                  std::cout << "(" << x << "," << y << ")\n";
             }             
};

#endif
