#include <iostream>

using namespace std;

class A {
  public:
    int fun(int x) { 
        return x * x; 
    }
};

class B : public A {
  public:
    int fun(int x, int y) {         // hides A::fun()
//        return fun(x) + fun(y);
        return A::fun(x) + A::fun(y);
    }
    int fun(int x, int y, int z) {  // hides A::fun()
        return A::fun(x) + y * y + z * z;
    }
};

int main() {
    A a;
    B b;
    
    cout << "a.fun(3)       = " << a.fun(3) << endl;
//    cout << "b.fun(3)       = " << b.fun(3) << endl;
    cout << "b.fun(3, 4)    = " << b.fun(3, 4) << endl;
    cout << "b.fun(1, 2, 3) = " << b.fun(1, 2, 3) << endl;
}
