#include <iostream>
#include <vector>

using namespace std;

struct Pair
{
    int x, y;
    Pair operator + (Pair b) { return {x+b.x, y+b.y}; }
    int operator * () { return x+y; }
};

int main()
{
    Pair a = {4, 7};
    Pair b = {2, 3};
    cout << *(a + b) << "\n";
    cout << a[b] << "\n";
    return 0;
}

