#44253: cpp answer


1121226@stu.wghs.tp.edu.tw (Arthur✨EC)


#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  int price_0=N;
  int price_1=N;
  if(N>=2000){
    price_0=N-(N/2000)*200;
  }
  if(N>=1000){
    price_1=N-(N/1000)*100;
  }
  if(price_0<=price_1){
    cout<<price_0<<" 0"<<endl;
  }
  else{
    cout<<price_1<<" 1"<<endl;
  }
}