class Money 
{
	private int p1;
	private int p2;
	private int credit;
	
	public Money()
	{
		p1=0; p2=0; credit=0;
	}
	
	public int getP1 ()
	{
		return (p1);
	}
	public int getP2 ()
	{
		return (p2);
	}
	public boolean useP1(){
		if (p1 > 0)
		{
			p1--;
			return(true);
		}
		else
			return(false);
	}
	public boolean useP2(){
		if (p2 > 0)
		{
			p2--;
			return(true);
		}
		else
			return(false);
	}
	public void addCredit()
	{
		credit++;
	}
	
	public void p1Press()
	{
		p1++;
		credit--;
	}
	
	public void p2Press()
	{
		p2++;
		credit--;
	}
	
	public int getCredit()
	{
		return(credit);
	}

}