#include <iostream>
#include <ctime>
using namespace std;
class Singleton
{
public :
static Singleton * getInstance(){
//lock
if (instance==NULL ){
instance= new Singleton ();
}
//unlock
return instance;
}
private :
Singleton(){
}
static Singleton * instance;
};
Singleton * Singleton::instance= NULL ;
int main(){
Singleton * s1=Singleton ::getInstance();
Singleton * s2=Singleton ::getInstance();
if (s1==s2){
cout<< "yes" <<endl;
} else
{
cout<< "no" <<endl;
}
return 0;
}