#include <iostream>
#include <initializer_list>
using namespace std;

class sample 
{
 private:

        int a,b;

public:

    sample(int i)
    {
        a=i;
        b=i;
    }

	sample(std::initializer_list<int> l) {
		int i = 0;
		if(l.size() > 2U) { /* throw */ }
		for(int x : l) {
			if(i == 0) a = x;
			else if(i == 1) b = x;
			++i;
		}
	}

    sample(int i, int j)
    {
        a=i;
        b=j;
    }

    void display()
    {
        cout<<a<<endl<<b;
    }

};


int main()
{
        sample s = 10;
        sample c = {10,20};
        c.display();
}
