import java.io.*;
import hsa.Console;

// The "Rhombus" class.
public class Pong
{
    public static void main (String[] args) throws IOException
    {

	// Open up the input and output file for IO purpose
	FileReader inFile = new FileReader ("DATA1.txt");
	FileWriter outFile = new FileWriter ("OUT1.txt");

	// Link the input and output file for
	BufferedReader in = new BufferedReader (inFile);
	BufferedWriter out = new BufferedWriter (outFile);

	String e, f;
	int a, b;

	// Keep reading as long as not end of file (eof)
	while ((e = in.readLine ()) != null)
	{
	    int c = 50;
	    int d = 25;
	    f = in.readLine ();
	    a = Integer.parseInt (e);
	    b = Integer.parseInt (f);
	    while (true)
	    {
		c += a;
		d += b;
		if (c > 100 || c < 0 || d < 0 || d > 50)
		{
		    c -= a;
		    d -= b;
		    break;
		}

		else if (c == 100 || c == 0 || d == 0 || d == 50)
		{

		    break;
		}

	    }
	    out.write ("" + c);
	    out.write ("," + d);
	    out.newLine ();
	    out.flush ();

	}
	out.close ();

    }




}


// main method
// End of Class



