#include <iostream>

class Bar
{
public:
    Bar(int first, int second) : m_first(first), m_second(second)
    {

    }

    bool operator<(const Bar &other) const
    {
        return (m_first * m_second) < (other.m_first * other.m_second);
    }

private:
    int m_first;
    int m_second;
};

int main()
{
    Bar a(1, 2);
    Bar b(2, 3);

    if(a < b)
    {
        std::cout << "a < b" << std::endl;
    }

    return 0;
}
