#include <iostream>
#include <cmath>
#include <iomanip>

using namespace std;

double f(double x){
  return(sin(x));
}

double fprime(double x){
  return(cos(x));
}

int main(){


  double x,eps,c;
  cin >> x >> eps >> c;
 
  double error;
  
  while( (fabs(f(x))>eps) || (fabs(f(x)/fprime(x)) > eps) ){

    x = x-c*(f(x)/fprime(x));
    error = fabs(f(x)/fprime(x));
    cout << setprecision(10)   << x << " " << error << endl;
  }
  
 return(0);
}
