#include<iostream> using namespace std; int main(){ int n,a,b=0,d; cin>>n; int c=n; while(c!=0){ a=0; for(int i=1;i<=c;i+=3){ if(i==c && b==0){ b=d+1; } a++; } c-=a; d++; } cout<<d<<" "<<b; }