import javax.sound.sampled.Line;
import java.awt.Point;
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
import java.io.*;
import java.math.BigInteger;
import static java.math.BigInteger.*;
import java.util.*;
public class A{

    ArrayList<Long>all;

    void solve()throws Exception
    {
        int n=nextInt();
        System.out.print(n/36+" ");
        n%=36;
        int res;
        if(n%3==0)
            res=n/3;
        else if(n%3==1)
            res=n/3;
        else
            res=n/3+1;
        System.out.println(res);


    }
    long solve(int r)
    {
        int[]dp=new int[all.size()];
        for(int i=0;i<dp.length;i++)
        {
            long x=all.get(i);
            int low=0;
            int high=r+1;
            while (high-low>1)
            {
                int mid=(low+high)/2;
                if(x>=mid)
                    low=mid;
                else
                    high=mid;
            }
            dp[i]=low+1;
        }
        long res=0;
        for(int i=0;i<dp.length;i++)
        {
            res+=dp[i]*all.get(i);
            if(i>0)
                res-=dp[i-1]*all.get(i);
        }
        return res;

    }
    void get(long cur,long max)
    {
        if(cur>max)
            return;
        if(cur!=0)
            all.add(cur);
        get(10*cur+4,max);
        get(10*cur+7,max);

    }


     ////////////
    BufferedReader reader;
    PrintWriter writer;
    StringTokenizer stk;
    void run()throws Exception
    {
        reader=new BufferedReader(new InputStreamReader(System.in));
        stk=null;
        writer=new PrintWriter(new PrintWriter(System.out));
        solve();
        reader.close();
        writer.close();
    }
    int nextInt()throws Exception
    {
        return Integer.parseInt(nextToken());
    }

    long nextLong()throws Exception
    {
        return Long.parseLong(nextToken());

    }
    double nextDouble()throws Exception
    {
        return Double.parseDouble(nextToken());


    }

    String nextString()throws Exception
    {
        return nextToken();
    }
    String nextLine()throws Exception
    {
        return reader.readLine();
    }
    String nextToken()throws Exception
    {
        if(stk==null || !stk.hasMoreTokens())
        {
            stk=new StringTokenizer(nextLine());
            return nextToken();

        }
        return stk.nextToken();
    }

    public static void main(String[]args) throws Exception
    {
        new A().run();
    }



}