//2011 ECNA

#include <iostream>
using namespace std;

const bool DEBUG=false;

#define IFD if (DEBUG)

int s, c, p, l; //s = size of chain ring
                //c = length of chain
               //p = location of broken prong
               //l = location of broken link

void step(int &tooth, int & link){
  tooth = (tooth + 1) % s;
  link = (link + 1) % c;
}

int main() {
  int tooth, link, steps, CASES=1;

  cin>>s>>c>>p>>l;
  while(s>0){
    tooth = p; link = l;
    steps = 0;
    //move one step forward until tooth==link==0 OR
    //  get back to original position
IFD cout<<tooth<<' '<<link<<' '<<steps<<endl;
    step(tooth, link);
    steps++;
    while (((tooth>0)||(link>0)) && ((tooth!=p)||(link!=l)))
    {
IFD cout<<tooth<<' '<<link<<' '<<steps<<endl;
      step(tooth, link);
      steps++;
    }

    cout<<"Case "<<CASES++<<":";
    if ((tooth==0) && (link==0))    //chain fell off
    {
      cout <<" "<<steps/s;
      cout<<" "<<steps%s<<'/'<<s;
      cout<<endl;
    }
    else
      cout<<" Never"<<endl;

IFD cout<<steps<<endl;

    cin>>s>>c>>p>>l;
  }

  return 0;
}

