Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	io := NewIo()
	defer io.Flush()
	th := io.NextInt()
	io.Println(th/30, th%30*2)
}

// I/O template
type Io struct {
	reader    *bufio.Reader
	writer    *bufio.Writer
	tokens    []string
	nextToken int
}

func NewIo() *Io {
	return &Io{
		reader: bufio.NewReader(os.Stdin),
		writer: bufio.NewWriter(os.Stdout),
	}
}

func (io *Io) Flush() {
	err := io.writer.Flush()
	if err != nil {
		panic(err)
	}
}

func (io *Io) NextLine() string {
	var buff []byte
	for {
		line, isPrefix, err := io.reader.ReadLine()
		if err != nil {
			panic(err)
		}
		buff = append(buff, line...)
		if !isPrefix {
			break
		}
	}
	return string(buff)
}

func (io *Io) Next() string {
	for io.nextToken >= len(io.tokens) {
		line := io.NextLine()
		io.tokens = strings.Fields(line)
		io.nextToken = 0
	}
	s := io.tokens[io.nextToken]
	io.nextToken++
	return s
}

func (io *Io) NextInt() int {
	i, err := strconv.Atoi(io.Next())
	if err != nil {
		panic(err)
	}
	return i
}

func (io *Io) NextFloat() float64 {
	i, err := strconv.ParseFloat(io.Next(), 64)
	if err != nil {
		panic(err)
	}
	return i
}

func (io *Io) Println(a ...interface{}) {
	fmt.Fprintln(io.writer, a...)
}

func (io *Io) Printf(format string, a ...interface{}) {
	fmt.Fprintf(io.writer, format, a...)
}

func (io *Io) PrintIntSlice(a []int) {
	b := []interface{}{}
	for _, x := range a {
		b = append(b, x)
	}
	io.Println(b...)
}

func (io *Io) PrintStringSlice(a []string) {
	b := []interface{}{}
	for _, x := range a {
		b = append(b, x)
	}
	io.Println(b...)
}

func Log(name string, value interface{}) {
	fmt.Fprintf(os.Stderr, "%s=%+v\n", name, value)
}

func ExampleIo() {
	io := NewIo()
	defer io.Flush()
	a := make([]int, 0, 3)
	a[0], a[1], a[2] = io.NextInt(), io.NextInt(), io.NextInt()
	io.Println(a)
	io.PrintIntSlice(a)
	Log("io", a)
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
  
  int d;
  cin>>d;

  cout<<d/30<<' ';
  d%=30;
  cout<<d*2<<endl;
  
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
  int x;
  cin>>x;
  cout<<x/30<<' '<<x%30*2<<endl;
  return 0;
}

C++: #include <iostream>
using namespace std;
typedef long long ll;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int t;
	cin >> t;

	int h = t / 30, m = t % 30 * 2;
	cout << h << " " << m << endl;
}

C++: #include<iostream>
using namespace std;

main(){
  int t ;cin >> t;
  int h = t/30;
  int m = (t%30)*10/5;
  cout << h << " " << m << endl;
}

C++: #include <iostream>

using namespace std;

int theta;
int main(void) {
	cin >> theta;
	int min = 12 * 60 * theta / 360;
	cout << min / 60 << " " << min % 60 << endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
 
int main(){
  int x;
  cin>>x;
  cout<<x/30<<' '<<x%30*2*2<<endl;
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){

    int n; cin >> n;
    cout << n / 30 << " ";
    n -= (n / 30) * 30;
    cout << 2 * n << endl;
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int d;
  cin>>d;
  d*=2;
  cout<<d/60<<" "<<d%60<<endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;

ll theta;

int main(void) {
  cin >> theta;

  cout << (theta / 30) << " " << (theta * 2) % 60 << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<ll, pair<ll, ll> > P3;

const ll MOD = ll(1e9 + 7);
const ll LLINF = LLONG_MAX;
const int IINF = INT_MAX;
const int MAX_N = int(3e5) + 5;
const double EPS = 1e-8;
const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
#define SORT(v) sort((v).begin(), (v).end())
#define SORTR(v) sort((v).rbegin(), (v).rend())
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (ll i = m; i < n; i++)
#define ALL(v) (v).begin(), (v).end()

int main() {
    ll n;
    cin >> n;
    cout << n/30 << " " << n%30*2 << endl;
    return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define REP(i, n) rep(i, 0, n)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define int long long
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
using namespace std;
typedef pair<int, int> P;
const int mod = 1000000007;
const int INF = 1e12;

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int a;
    cin >> a;
    a *= 2;
    cout << a / 60 << " " << a % 60 << endl;
}

C++: #include<bits/stdc++.h>

using namespace std;

int main()
{
  int theta;
  cin >> theta;
  cout << theta / 30 << " " << theta % 30 * 2 << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;

ll theta;

int main(void) {
  cin >> theta;

  cout << (theta / 30) << " " << (theta * 2) % 60 << endl;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
  int x;
  cin>>x;
  cout<<x/30<<' '<<x%30*2<<endl;
  return 0;
}

C++: /*  -*- coding: utf-8 -*-
 *
 * 3013.cc: 
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

/* typedef */

/* global variables */

/* subroutines */

/* main */

int main() {
  int t;
  scanf("%d", &t);

  printf("%d %d\n", t / 30, (t % 30) * 2);
  return 0;
}

C++: #include<deque>
#include<queue>
#include<vector>
#include<algorithm>
#include<iostream>
#include<set>
#include<cmath>
#include<tuple>
#include<string>
#include<chrono>
#include<functional>
#include<iterator>
#include<random>
#include<unordered_set>
#include<unordered_map>
#include<array>
#include<map>
#include<iomanip>
//<< setprecision(5)
using namespace std;
typedef long long int llint;
typedef long double lldo;
#define mp make_pair
#define mt make_tuple
#define pub push_back
#define puf push_front
#define pob pop_back
#define pof pop_front
#define fir first
#define sec second
#define res resize
#define ins insert
#define era erase
#define dme cout<<-1<<endl;return 0
const int mod=1000000007;
const int big=1e9;
const long double pai=3.141592653589793238462643383279502884197;
const long double eps=1e-7;
template <class T,class U>void mineq(T& a,U b){if(a>b){a=b;}}
template <class T,class U>void maxeq(T& a,U b){if(a<b){a=b;}}
llint gcd(llint a,llint b){if(a%b==0){return b;}else return gcd(b,a%b);}
llint lcm(llint a,llint b){return a/gcd(a,b)*b;}
int main(void){
	int n,i,j,ans=0;
	cin>>n;
	cout<<n/30<<" "<<2*(n%30)<<endl;
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin>>n;
    cout<<n/30<<" "<<(n%30)*2<<endl;
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main() {
  int t;
  cin >> t;
  int sum = 0;
  int a = 0;
  if(t > 0) {
    for(a = 0;t - (30 * a) >= 30; ++a) {
    }
    sum = (t - 30 * a) * 2;
  }
  cout << a << " " << sum << endl;
  return 0;
}

C++: #include <bits/stdc++.h>
#define REP(i,a,b) for(int i=(a);i<(b);i++)
typedef long long ll; typedef long double ld;
using namespace std;
const int INF=1e9, MOD=1e9+7;
const int MAX_N=10000;
int n;

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	cin >> n;
	
	cout << n/30 << " " << 2*(n%30) << endl;
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define lp(i,n) for(int i=0;i<n;i++)
#define int long long
#define DEKAI 1000000007
#define INF (1<<28)
/* ┗(^o^)┛ｗｗｗｗｗ┏(^o^)┓ﾄﾞｺﾄﾞｺﾄﾞｺﾄﾞｺｗｗｗｗｗ */


signed main(){

	int n;

	cin>>n;


	cout<<n/30<<" "<<(n%30)*2<<endl;



  	return 0;
}