let solve a b r =
  let diameter = 2 * r in
  if diameter <= a && diameter <= b then "First"
  else "Second"

let _ =
  Printf.printf "%s\n" (Scanf.scanf "%d %d %d\n" solve)

module Std = struct

  module List = struct
    include List
    module L = List
    let map f lst = L.rev (L.rev_map f lst)
    let map2 f l1 l2 = L.rev (L.rev_map2 f l1 l2)
    let each_cons f lst = L.rev_map2 f (L.tl (L.rev lst)) (L.rev (L.tl lst))
    let append x y = L.rev (L.rev_append x y)
    let fold = L.fold_left
    let permute_with lst p = L.map (Array.get (Array.of_list lst)) p
  end

  let ( |> ) x f = f x
  let ( <| ) f x = f x
  let ( ~. ) = float_of_int
  let ( @ ) = List.append

  let rec repeat n f x = if n = 0 then x else repeat (n-1) f (f x)

  let di x = prerr_endline (string_of_int x); x
  let df f = prerr_endline (string_of_float f); f
  let ds s = prerr_endline s; s

  let int () = Scanf.scanf " %d" (fun x -> x)
  let read_int = int
  let float () = Scanf.scanf " %f" (fun x -> x)
  let read_float = float
  let rec n_int n () = List.rev <| repeat n (fun lst -> int () :: lst) []
  let rec n_float n () = List.rev <| repeat n (fun lst -> float () :: lst) []

end

open Std
module L = List

(* entry point *)

let a = int ()
let b = int ()
let r = int ()

let () =
  Printf.printf "%s\n"
    (if r*2 <= a && r*2 <= b then "First"
     else "Second")

let ni = fun _ -> Scanf.scanf " %d" (fun x -> x) in
let a = ni () in
let b = ni () in
let d = 2 * ni () in
print_string (if a >= d && b >= d then "First" else "Second");;

let solve a b r =
  let diam = 2 * r in
  let plate_in_a_row len r =
    len/(2*diam-1) + (len-(len/(2*diam-1))*(2*diam-1))/diam
  in
  if ((plate_in_a_row a r) * (plate_in_a_row b r)) mod 2 == 0 then "Second"
  else "First"

let _ =
  Printf.printf "%s\n" (Scanf.scanf "%d %d %d\n" solve)

let solve a b r =
  let diam = 2 * r in
  let vdiam = 4*r - 1 in
  let max_in_a_row n r =
    ((n/vdiam) + (n-(a/vdiam))/diam)
  in
  if ( (max_in_a_row a r) * (max_in_a_row b r) ) mod 2 == 0 then "Second"
  else "First"

let _ =
  Printf.printf "%s\n" (Scanf.scanf "%d %d %d\n" solve)

let solve a b r =
  let diam = 2 * r in
  let plate_in_a_row len r =
    len/(2*diam-1) + (len-(len/(2*diam-1)))/diam
  in
  if ((plate_in_a_row a r) * (plate_in_a_row b r)) mod 2 == 0 then "Second"
  else "First"

let _ =
  Printf.printf "%s\n" (Scanf.scanf "%d %d %d\n" solve)

let solve a b r =
  let diameter = 2 * r in
  if ((a/diameter) * (b/diameter)) mod 2 == 0 then "Second"
  else "First"

let _ =
  Printf.printf "%s\n" (Scanf.scanf "%d %d %d\n" solve)


let (|>) x f = f x ;;
let (@@) f x = f x ;;

let ident x = x ;;
let ident2 x y = (x, y) ;;
let ident3 x y z = (x, y, z) ;;
let ident4 x y z w = (x, y, z, w) ;;
let ident5 x y z w v = (x, y, z, w, v) ;;

let char_to_int x = int_of_char x - int_of_char '0' ;;
let int_to_char x = char_of_int (x + int_of_char '0') ;;

module List = struct
  include ListLabels ;;

  let rec iteri i f = function
    | [] -> ()
    | a::l -> f i a; iteri (i + 1) f l

  let iteri ~f l = iteri 0 f l
end
;;

module Array = struct
  include ArrayLabels ;;

  let reduce ~f xs =
    let acc = ref xs.(0) in
    for i = 1 to length xs - 1 do
      acc := f !acc xs.(i)
    done;
    !acc
  ;;
end
;;

module String = struct
  include StringLabels ;;

  let map_to_list ~f ss =
    let res = ref [] in
    iter ss ~f:(fun c -> res := f c :: !res);
    List.rev !res
  ;;

  let of_char_list ss =
    let res = String.create @@ List.length ss in
    List.iteri ss ~f:(fun i c -> res.[i] <- c);
    res
  ;;

  let iteri ~f a =
    for i = 0 to length a - 1 do f i (unsafe_get a i) done
  ;;
end
;;

module Float = struct
  let (+) = (+.)
  let (-) = (-.)
  let ( * ) = ( *. )
  let (/) = (/.)
end
;;

module Int64 = struct
  include Int64
  let (+) = add
  let (-) = sub
  let ( * ) = mul
  let (/) = div
end
;;

let fold_for ?(skip=1) min max ~init ~f =
  let acc = ref init in
  let cur = ref min in
  while !cur < max do
    acc := f !acc !cur;
    cur := !cur + skip;
  done;
  !acc
;;

let iter_for ?(skip=1) min max ~f =
  let cur = ref min in
  while !cur < max do
    f !cur;
    cur := !cur + skip;
  done
;;

let () =
  let n = Scanf.scanf "%d " ident in
  let xs = fold_for 0 n ~init:[] ~f:(fun acc x ->
    Scanf.scanf "%d " ident :: acc) |> List.rev in
  let rec iter ps prev = function
  | [] -> print_endline "no"
  | cur :: xs ->
    let x, y = (min cur prev, max cur prev) in
    List.iter ps ~f:(fun (x, y) -> Printf.eprintf "%d, %d\n" x y);
    prerr_endline "ok";
    if List.exists ps ~f:(fun (x', y') ->
      x < x' && x' < y && y < y' ||
        x' < x && x < y' && y' < y) then
      print_endline "yes"
    else iter ((x, y) :: ps) cur xs in
  match xs with
  | [] -> assert false
  | x :: xs -> iter [] x xs
;;

let (|>) x f = f x
let (<|) f x = f x

let rec loop n f acc =
  if n = 0 then List.rev acc else loop (n-1) f ((f n) :: acc)

let next_int () = Scanf.scanf "%d%c" (fun x _ -> x)

let rec make_pair l acc =
  match l with
	[] -> acc
  | [x] -> acc
  | x :: ((y :: ys) as xs) -> make_pair xs ((if x <= y then (x, y) else (y, x) ):: acc)

let n = next_int()

let a = loop n (fun _ -> next_int ()) []
let b = make_pair a []
;;

let valid p =
  let intersect q =
	let x1 = fst p in
	let y1 = snd p in
	let x2 = fst q in
	let y2 = snd q in
	if x1 <= x2 then x2 > x1 && x2 < y1 && y2 > y1
	else y2 > x1 && y2 < y1 in
  List.exists intersect b
;;

let () =
(* List.iter (fun (x, y) -> print_int x; print_string " "; print_int y;
  print_string "\n") b; *)
if List.exists valid b then print_string "yes" else print_string "no"

let (|>) x f = f x
let (<|) f x = f x

let rec loop n f acc =
  if n = 0 then List.rev acc else loop (n-1) f ((f n) :: acc)

let next_int () = Scanf.scanf "%d%c" (fun x _ -> x)

let rec make_pair l acc =
  match l with
	[]  -> acc
  | [x] -> acc
  | x :: ((y :: ys) as xs) -> make_pair xs ((x, y) :: acc)

let n = next_int()

let a = loop n (fun _ -> next_int ()) []
let b = make_pair a []

let valid p =
  let intersect q =
	let x1 = fst p in
	let y1 = snd p in
	let x2 = fst q in
	let y2 = snd q in
	if x1 <= x2 then x2 < y1 && y2 > y1
	else y2 > x1 && y2 < y1 in
  List.exists intersect b

let () = if List.exists valid b then print_string "yes" else print_string "no"

let (|>) x f = f x
let (<|) f x = f x

let rec loop n f acc =
  if n = 0 then List.rev acc else loop (n-1) f ((f n) :: acc)

let next_int () = Scanf.scanf "%d%c" (fun x _ -> x)

let rec make_pair l acc =
  match l with
	[] -> acc
  | [x] -> acc
  | x :: ((y :: ys) as xs) -> make_pair xs ((if x <= y then (x, y) else (y, x) ):: acc)

let n = next_int()

let a = loop n (fun _ -> next_int ()) []
let b = make_pair a []
;;

let valid p =
  let intersect q =
	let x1 = fst p in
	let y1 = snd p in
	let x2 = fst q in
	let y2 = snd q in
	if x1 <= x2 then x2 < y1 && y2 > y1
	else y2 > x1 && y2 < y1 in
  List.exists intersect b
;;

let () = if List.exists valid b then print_string "yes" else print_string "no"


let in_channel = stdin;;

let n = int_of_string (input_line in_channel);;

let s = input_line in_channel;;

let rec count a = match (String.length a) with
| 0 -> 0
| 1 -> 1
| _ -> (
	if ((String.sub a 0 2) = "RU" || (String.sub a 0 2) = "UR") then
		1 + count (String.sub a 2 ((String.length a) - 2))
	else
		1 + count (String.sub a 1 ((String.length a) - 1))
);;

Printf.printf "%d\n" (count s);;

let read_int () = Scanf.scanf " %d" (fun x -> x);;
let read_string () = Scanf.scanf " %s" (fun x -> x);;

let n = read_int();;

let s = read_string();;

let rec cut s = match (String.length s) with
     | 0 -> 0
     | 1 -> 1
     | _ ->
        if (String.get s 0 = String.get s 1) then 1 + cut(String.sub s 1 ((String.length s) - 1))
        else 1 + cut(String.sub s 2 ((String.length s) - 2));;

Printf.printf "%d\n" (cut s);

let read_int () = Scanf.scanf " %d" (fun x -> x);;
let read_string () = Scanf.scanf " %s" (fun x -> x);;

let s = read_string();;

let rec cut s = match (String.length s) with
     | 0 -> 0
     | 1 -> 1
     | _ ->
        if (String.get s 0 = String.get s 1) then 1 + cut(String.sub s 1 ((String.length s) - 1))
        else 1 + cut(String.sub s 2 ((String.length s) - 2));;

Printf.printf "%d\n" (cut s);


let read_int () = Scanf.bscanf Scanf.Scanning.stdib " %d " (fun x -> x)

let rec fold i j f init = if i>j then init else fold (i+1) j f (f i init)
let sum i j f = fold i j (fun i a -> (f i) + a) 0

let () =
  let a = Array.make_matrix 3 3 0 in
    for i=0 to 2 do
      for j=0 to 2 do
	a.(i).(j) <- read_int()
      done
    done;

    let ismagic () =
      let s = sum 0 2 (fun i -> a.(i).(i)) in
	sum 0 2 (fun i -> a.(i).(2-i)) = s &&
(*	sum 0 2 (fun i -> a.(0).(i)) = s &&
	sum 0 2 (fun i -> a.(1).(i)) = s &&
	sum 0 2 (fun i -> a.(2).(i)) = s && *)
	sum 0 2 (fun i -> a.(i).(0)) = s &&
	sum 0 2 (fun i -> a.(i).(1)) = s &&
	sum 0 2 (fun i -> a.(i).(2)) = s
    in

    let rec loop t = if t>100_000 then false else (
      a.(0).(0) <- t;
      let s = t + a.(0).(1) + a.(0).(2) in
	a.(1).(1) <- s - a.(1).(0) - a.(1).(2);
	a.(2).(2) <- s - a.(2).(0) - a.(2).(1);
	if ismagic () then true else loop (t+1)
    )
    in

      if loop 0 then (
	for i=0 to 2 do
	  for j=0 to 2 do
	    Printf.printf "%d " a.(i).(j)
	  done;
	  print_newline()
	done
      ) else (
	Printf.printf "impossible\n"
      )

(* Codeforces 257B SlonMagSquare *)

open Filename;;
open String;;

(* you can use either gr or rdln but not both *)
let use_input_txt = false;;
let fn = (Filename.dirname Filename.current_dir_name);;
let filename = Filename.concat "." "input.txt";;
let cin = if use_input_txt then Scanf.Scanning.open_in filename
	else Scanf.Scanning.stdin;;

let cout = open_out "output.txt";;
let gr () = Scanf.bscanf cin " %d" (fun i -> i);;
let grf () = Scanf.scanf " %f" (fun i -> i);;
let grl () = Scanf.scanf " %Ld" (fun i -> i);;
let rdln() = input_line Pervasives.stdin;;
(* let spli s = Str.split (Str.regexp " ") s;; *)
let printlisti li = List.iter (fun i -> (print_int i; print_string " ")) li;;
let printarri ai = Array.iter (fun i -> (print_int i; print_string " ")) ai;;
let debug = false;;

let mg = Array.make_matrix 3 3 0;;

let readmat () =
	begin
		for i = 0 to 2 do
			for j = 0 to 2 do
				mg.(i).(j) <- gr()
			done
		done
	end;;

let solve() =
	let cma = (mg.(0).(1) + mg.(0).(2) - mg.(2).(0) - mg.(2).(1)) in
	let bma = mg.(0).(1) + mg.(0).(2) - mg.(1).(0) - mg.(1).(2) in
	let cpa = mg.(2).(0) + mg.(0).(2) in
	let c = (cpa + cma) / 2 in
	let a = (cpa - cma) / 2 in
	let b = a + bma in
	begin
		mg.(0).(0) <- a;
		mg.(1).(1) <- b;
		mg.(2).(2) <- c;
	end;;

let printmat () =
	for i = 0 to 2 do
		begin
			for j = 0 to 2 do
				begin
					print_int mg.(i).(j);
					print_string " "
				end
			done;
			print_newline ()
		end
	done;;

let main () =
	begin
		readmat ();
		solve();
		printmat()
	end;;

main();;


let s =  Scanf.scanf "%s " ( fun x -> x) |> String.lowercase

let h = "hello";;
let j = ref 0;;
let c = ref (String.get h !j);;
let flag = ref "NO";;

exception Success;;
  try
for i = 0 to String.length s - 1 do
  let si = String.get s i in
  if(si == !c) then
    begin
      incr j;
      if (!j > 4) then raise Success;
      c := String.get h !j;
    end
done
  with Success -> flag := "YES";;

    print_endline !flag;;

let input () = Scanf.scanf "%s" (fun s -> s)

let rec traverse input target i n =
    if i < String.length target
    then
        if n < String.length input
        then
            let char = String.get input n in
            if char = String.get target i
            then
                traverse input target (i + 1) (n + 1)
            else
                traverse input target i (n + 1)
        else
            "NO"
    else
        "YES"

let solve input = traverse input "hello" 0 0

let print result = Printf.printf "%s\n" result

let () = print (solve (input ()))

let input () = Scanf.scanf "%s" (fun s -> s)

let rec traverse input target i n =
    if n < String.length input
    then
        if i < String.length target
        then
            let char = String.get input n in
            if char = String.get target i
            then
                if i + 1 = String.length target
                then
                    "YES"
                else
                    traverse input target (i + 1) (n + 1)
            else
                traverse input target i (n + 1)
        else
            "NO"
    else
        "NO"

let solve input = traverse input "hello" 0 0

let print result = Printf.printf "%s\n" result

let () = print (solve (input ()))

open List;;

let chat = fun s ->
        let hello = ['h';'e';'l';'l';'o'] in

        let rec pom l i len =
                if i > len || (i = len && l != [] ) then
                     print_string "NO"
                else
                        match l with
                        |[] ->  print_string "YES"
                        | hl::tl -> if s.[i] = hl then pom tl (i + 1) len
               else pom l (i + 1) len
        in pom hello 0 (String.length s)
;;

Scanf.scanf "%s" chat;;

let s = read_line () in
let a = try
	let i = ref 0 in
	let _ = String.iter (fun c ->
		i := String.index_from s (!i) c + 1
	) "hello" in
	"YES"
with _ -> "NO" in
print_string a;;

let input () = Scanf.scanf "%s" (fun s -> s)

let rec traverse input target i n =
    if n < String.length input
    then
        if i + 1 < String.length target
        then
            let char = String.get input n in
            if char = String.get target i
            then
                traverse input target (i + 1) (n + 1)
            else
                traverse input target i (n + 1)
        else
            "YES"
    else
        "NO"

let solve input = traverse input "hello" 0 0

let print result = Printf.printf "%s\n" result

let () = print (solve (input ()))

let input () = Scanf.scanf "%s" (fun s -> s)

let rec traverse input target i n =
    if n < String.length input
    then
        if i < String.length target
        then
            let char = String.get input n in
            if char = String.get target i
            then
                traverse input target (i + 1) (n + 1)
            else
                traverse input target i (n + 1)
        else
            "YES"
    else
        "NO"

let solve input = traverse input "hello" 0 0

let print result = Printf.printf "%s\n" result

let () = print (solve (input ()))

let input () = Scanf.scanf "%s" (fun s -> s)

let rec traverse input target i n =
    if n < String.length input
    then
        if i < String.length target
        then
            let char = String.get input n in
            if char = String.get target i
            then
                if i = String.length target
                then
                    "YES"
                else
                    traverse input target (i + 1) (n + 1)
            else
                traverse input target i (n + 1)
        else
            "NO"
    else
        "NO"

let solve input = traverse input "hello" 0 0

let print result = Printf.printf "%s\n" result

let () = print (solve (input ()))

let input () = Scanf.scanf "%s" (fun s -> s)

let rec traverse input target i n =
    if n < String.length input
    then
        if i = String.length target
        then
            "YES"
        else
            let char = String.get input n in
            if char = String.get target i
            then
                traverse input target (i + 1) (n + 1)
            else
                traverse input target i (n + 1)
    else
        "NO"

let solve input = traverse input "hello" 0 0

let print result = Printf.printf "%s\n" result

let () = print (solve (input ()))

let s =  Scanf.scanf "%s " ( fun x -> x) |> String.lowercase

let h = "hello";;
let j = ref 0;;
let c = ref (String.get h !j);;
let flag = ref "NO";;

exception Success;;
  try
for i = 0 to String.length s - 1 do
  let si = String.get s i in
  if(si == !c) then
    begin
      incr j;
      c := String.get h !j;
      if (!j>=4) then raise Success
    end
done
  with Success -> flag := "YES";;

    print_endline !flag;;


open Big_int

let (+|) = add_big_int
let (-|) = sub_big_int
let ( *| ) = mult_big_int
let (/|) = div_big_int
let bmod = mod_big_int
let (=|) = eq_big_int
let (/=|) a b = not (a =| b)
let (>|) = gt_big_int
let (<|) = lt_big_int
let (>=|) = ge_big_int
let (<=|) = le_big_int

let n0 = zero_big_int
let n1 = unit_big_int
let n2 = big_int_of_int 2
let n9 = big_int_of_int 9
let n10 = big_int_of_int 10

let _ =
  let sb = Scanf.Scanning.stdib in
  let s = Scanf.bscanf sb "%s " (fun s -> s) in
  let n = String.length s in
  let a = Array.make 10 false in
  let b = Array.make 11 0 in
  let cnt = ref 10 in
  let res = ref n1 in
    for i = 0 to n - 1 do
      let c = s.[i] in
	match c with
	  | '0'..'9' -> ()
	  | '?' ->
	      if i = 0
	      then b.(9) <- b.(9) + 1
	      else b.(10) <- b.(10) + 1
	  | 'A'..'J' ->
	      let k = Char.code c - Char.code 'A' in
		if not a.(k) then (
		  a.(k) <- true;
		  if i = 0
		  then b.(9) <- b.(9) + 1
		  else b.(!cnt) <- b.(!cnt) + 1;
		  decr cnt
		)
	  | _ -> assert false
    done;
    for i = 1 to 10 do
      res := !res *| power_int_positive_int i b.(i)
    done;
    Printf.printf "%s\n" (string_of_big_int !res)

open Big_int

let (+|) = add_big_int
let (-|) = sub_big_int
let ( *| ) = mult_big_int
let (/|) = div_big_int
let bmod = mod_big_int
let (=|) = eq_big_int
let (/=|) a b = not (a =| b)
let (>|) = gt_big_int
let (<|) = lt_big_int
let (>=|) = ge_big_int
let (<=|) = le_big_int

let n0 = zero_big_int
let n1 = unit_big_int
let n2 = big_int_of_int 2
let n9 = big_int_of_int 9
let n10 = big_int_of_int 10

let _ =
  let sb = Scanf.Scanning.stdib in
  let s = Scanf.bscanf sb "%s " (fun s -> s) in
  let n = String.length s in
  let a = Array.make 10 false in
  let cnt = ref 10 in
  let res = ref n1 in
    for i = 0 to n - 1 do
      let c = s.[i] in
	match c with
	  | '0'..'9' -> ()
	  | '?' ->
	      if i = 0
	      then res := !res *| n9
	      else res := !res *| n10
	  | 'A'..'J' ->
	      let k = Char.code c - Char.code 'A' in
		if not a.(k) then (
		  a.(k) <- true;
		  if i = 0
		  then res := !res *| n9
		  else res := !res *| (big_int_of_int !cnt);
		  decr cnt
		)
	  | _ -> assert false
    done;
    Printf.printf "%s\n" (string_of_big_int !res)


open Scanf
open Printf
open Char

let max a b = if a > b then a else b;;

let foo d = let a = lowercase d in if(a >= 'a' && a <= 'z') then 0 else 1;;

let () =
let n = scanf " %d " (fun x-> x) in
let s = scanf " %s " (fun x-> x) in
let rec calc i l typ len cnt =
if i < n then match(s.[i]) with
'(' ->  calc (i + 1) 0 true (max len l) cnt
| ')' -> calc (i + 1) 0 false len cnt
| '_' -> calc (i + 1) 0 typ (if typ then len else (max len l)) cnt
| _ -> calc (i + 1) (l + 1) typ len (if typ then cnt + foo s.[i - 1] else cnt)
else printf "%d %d\n" (max len l) cnt in calc 0 0 false 0 0;;

let read_int () = Scanf.bscanf Scanf.Scanning.stdib " %d " (fun x -> x)
let read_string () = Scanf.bscanf Scanf.Scanning.stdib " %s " (fun x -> x)

let parse_sentence sentence length =
  let w_outside = ref [] in
  let w_inside = ref [] in
  let buffer = Buffer.create length in
  let in_flag = ref false in
  for i = 0 to length - 1 do
    let c = sentence.[i] in
    if c = '(' then
      begin
        in_flag := true;
        if Buffer.length buffer != 0 then
          begin
            w_outside := (Buffer.contents buffer)::!w_outside;
            Buffer.clear buffer;
          end
      end

    else if c = ')' then
      begin
        in_flag := false;
        if Buffer.length buffer != 0 then
          begin
            w_inside := (Buffer.contents buffer)::!w_inside;
            Buffer.clear buffer;
          end
      end

    else if c = '_' && Buffer.length buffer != 0 then
      begin
        if !in_flag = false then
          begin
            w_outside := (Buffer.contents buffer)::!w_outside;
            Buffer.clear buffer;
          end
        else
          begin
            w_inside := (Buffer.contents buffer)::!w_inside;
            Buffer.clear buffer;
          end
      end
    else if c = '_' then ()
    else if i = length - 1 then
      begin
        Buffer.add_char buffer c;
        w_outside := (Buffer.contents buffer)::!w_outside
      end
    else Buffer.add_char buffer c
  done;
  (!w_outside, !w_inside)

let () =
  let length = read_int () in
  let sentence = read_string () in
  let (w_outside, w_inside) = parse_sentence sentence length in
  let out_max_length = List.fold_left (fun acc ele ->
      max acc (String.length ele)) 0 w_outside in
  Printf.printf "%d %d" out_max_length (List.length w_inside)

let read_int () = Scanf.bscanf Scanf.Scanning.stdib " %d " (fun x -> x)
let read_string () = Scanf.bscanf Scanf.Scanning.stdib " %s " (fun x -> x)

let parse_sentence sentence length =
  let w_outside = ref [] in
  let w_inside = ref [] in
  let buffer = Buffer.create length in
  let in_flag = ref false in
  let has_parentheses = ref false in
  for i = 0 to length - 1 do
    let c = sentence.[i] in
    if c = '(' then
      begin
        in_flag := true;
        has_parentheses := true;
        if Buffer.length buffer != 0 then
          begin
            w_outside := (Buffer.contents buffer)::!w_outside;
            Buffer.clear buffer;
          end
      end

    else if c = ')' then
      begin
        in_flag := false;
        if Buffer.length buffer != 0 then
          begin
            w_inside := (Buffer.contents buffer)::!w_inside;
            Buffer.clear buffer;
          end
      end

    else if c = '_' && Buffer.length buffer != 0 then
      begin
        if !in_flag = false then
          begin
            w_outside := (Buffer.contents buffer)::!w_outside;
            Buffer.clear buffer;
          end
        else
          begin
            w_inside := (Buffer.contents buffer)::!w_inside;
            Buffer.clear buffer;
          end
      end
    else if c = '_' then ()
    else if i = length - 1 && Buffer.length buffer != 0 then
      begin
        Buffer.add_char buffer c;
        w_outside := (Buffer.contents buffer)::!w_outside
      end
    else Buffer.add_char buffer c
  done;
  if !has_parentheses then (!w_outside, !w_inside) else ([], [])

let () =
  let length = read_int () in
  let sentence = read_string () in
  let (w_outside, w_inside) = parse_sentence sentence length in
  let out_max_length = List.fold_left (fun acc ele ->
      max acc (String.length ele)) 0 w_outside in
  Printf.printf "%d %d" out_max_length (List.length w_inside)

let read_int () = Scanf.bscanf Scanf.Scanning.stdib " %d " (fun x -> x)
let read_string () = Scanf.bscanf Scanf.Scanning.stdib " %s " (fun x -> x)

let parse_sentence sentence length =
  let w_outside = ref [] in
  let w_inside = ref [] in
  let buffer = Buffer.create length in
  let in_flag = ref false in
  for i = 0 to length - 1 do
    let c = sentence.[i] in
    if c = '(' then
      begin
        in_flag := true;
        if Buffer.length buffer != 0 then begin
          w_outside := (Buffer.contents buffer)::!w_outside;Buffer.clear buffer;
        end
      end
    else if c = ')' then
      begin
        in_flag := false;
        if Buffer.length buffer != 0 then begin
          w_inside := (Buffer.contents buffer)::!w_inside; Buffer.clear buffer;
        end
      end
    else if c = '_' && Buffer.length buffer != 0 then
      begin
        if !in_flag = false then begin
          w_outside := (Buffer.contents buffer)::!w_outside;Buffer.clear buffer;
        end
        else begin
          w_inside := (Buffer.contents buffer)::!w_inside;
          Buffer.clear buffer;
        end
      end
    else if c = '_' then ()
    else Buffer.add_char buffer c
  done;
  (!w_outside, !w_inside)

let () =
  let length = read_int () in
  let sentence = read_string () in
  let (w_outside, w_inside) = parse_sentence sentence length in
  let out_max_length = List.fold_left (fun acc ele ->
      max acc (String.length ele)) 0 w_outside in
  Printf.printf "%d %d" out_max_length (List.length w_inside)

let read_int () = Scanf.bscanf Scanf.Scanning.stdib " %d " (fun x -> x)
let read_string () = Scanf.bscanf Scanf.Scanning.stdib " %s " (fun x -> x)

let parse_sentence sentence length =
  let w_outside = ref [] in
  let w_inside = ref [] in
  let buffer = Buffer.create length in
  let in_flag = ref false in
  for i = 0 to length - 1 do
    let c = sentence.[i] in
    if c = '(' then
      begin
        in_flag := true;
        if Buffer.length buffer != 0 then
          begin
            w_outside := (Buffer.contents buffer)::!w_outside;
            Buffer.clear buffer;
          end
      end

    else if c = ')' then
      begin
        in_flag := false;
        if Buffer.length buffer != 0 then
          begin
            w_inside := (Buffer.contents buffer)::!w_inside;
            Buffer.clear buffer;
          end
      end

    else if c = '_' && Buffer.length buffer != 0 then
      begin
        if !in_flag = false then
          begin
            w_outside := (Buffer.contents buffer)::!w_outside;
            Buffer.clear buffer;
          end
        else
          begin
            w_inside := (Buffer.contents buffer)::!w_inside;
            Buffer.clear buffer;
          end
      end
    else if c = '_' then ()
    else if i = length - 1 && Buffer.length buffer != 0 then
      begin
        Buffer.add_char buffer c;
        w_outside := (Buffer.contents buffer)::!w_outside
      end
    else Buffer.add_char buffer c
  done;
  (!w_outside, !w_inside)

let () =
  let length = read_int () in
  let sentence = read_string () in
  let (w_outside, w_inside) = parse_sentence sentence length in
  let out_max_length = List.fold_left (fun acc ele ->
      max acc (String.length ele)) 0 w_outside in
  Printf.printf "%d %d" out_max_length (List.length w_inside)

open Scanf
open Printf
open Char

let max a b = if a > b then a else b;;

let foo d = let a = lowercase d in if(a >= 'a' && a <= 'z') then 0 else 1;;

let () =
let n = scanf " %d " (fun x-> x) in
let s = scanf " %s " (fun x-> x) in
let rec calc i l typ len cnt =
if i < n then match(s.[i]) with
'(' ->  calc (i + 1) 0 true (max len l) cnt
| ')' -> calc (i + 1) 0 false len cnt
| '_' -> calc (i + 1) 0 typ (if typ then len else (max len l)) cnt
| _ -> calc (i + 1) (l + 1) typ len (if typ then cnt + foo s.[i - 1] else cnt)
else printf "%d %d\n" len cnt in calc 0 0 false 0 0;;


let main () =
  let getNumber () = Scanf.bscanf Scanf.Scanning.stdin " %d" (fun x -> x)
  in let c = getNumber ()
  in let o = getNumber ()
  in if o = 0 then
    Printf.printf "No"
  else if o = 1
    then if c = 0 then
      Printf.printf "Yes"
    else
      Printf.printf "No"
  else if c - o >= -1 && (c - o + 1) mod 2 = 0 then
    Printf.printf "Yes"
  else
    Printf.printf "No"
;;

main ();;

let judge x y =
  let times_for_original = y - 1 in
  let copy_produced_by_copy = x - times_for_original in
  (times_for_original >= 0) &&
  (copy_produced_by_copy >= 0) &&
  (copy_produced_by_copy mod 2 == 0) &&
  (copy_produced_by_copy == 0 || times_for_original > 0)

let output_yn v =
  (match v with
  | true -> print_string "Yes"
  | false -> print_string "No");
  print_char '\n'

let () =
  Scanf.scanf "%u %u" judge |> output_yn

(* TODO: do test *)
(* 1 0 *)
(* 2 1 *)

(* Codeforces 914 B Conan and Agasa play a Card Game - not done*)

(* you can use either gr or rdln but not both *)
let gr () = Scanf.scanf " %d" (fun i -> i);;
let grf () = Scanf.scanf " %f" (fun i -> i);;
let grl () = Scanf.scanf " %Ld" (fun i -> i);;
let grc () = Scanf.scanf " %c" (fun i -> i);;
let rdln() = input_line stdin;;
(* let spli s = Str.split (Str.regexp " ") s;; *)
let printlisti li = List.iter (fun i -> (print_int i; print_string " ")) li;;
let printarri ai = Array.iter (fun i -> (print_int i; print_string " ")) ai;;
let debug = false;;

let rec readlist n acc = match n with
	| 0 -> acc
	| _ -> readlist (n -1) (gr() :: acc);;

let printlisti li = List.iter (fun i -> (print_int i; print_string " ")) li;;

let possible x y =
	if y <= 0 then false
	else if x > 0 && y==1 then false
	else if x < (y - 1) then false
	else if (x mod 2) == (y mod 2) then false
	else true;;

let main() =
	let x = gr() in
	let y = gr() in
	let pos = possible x y in
	begin
		print_string (if pos then "Yes" else "No");
		print_string "\n"
	end;;

main();;

let judge x y =
  let times_for_original = y - 1 in
  let copy_produced_by_copy = x - times_for_original in
  (times_for_original >= 0) &&
  (copy_produced_by_copy >= 0) &&
  (copy_produced_by_copy mod 2 == 0)

let output_yn v =
  (match v with
  | true -> print_string "Yes"
  | false -> print_string "No");
  print_char '\n'

let () =
  Scanf.scanf "%u %u" judge |> output_yn

(* TODO: do test *)
(* 1 0 *)

let judge x y =
  let times_for_original = y - 1 in
  let copy_produced_by_copy = x - times_for_original in
  (copy_produced_by_copy >= 0) && (copy_produced_by_copy mod 2 == 0)

let output_yn v =
  (match v with
  | true -> print_string "Yes"
  | false -> print_string "No");
  print_char '\n'

let () =
  Scanf.scanf "%u %u" judge |> output_yn

let main () =
  let getNumber () = Scanf.bscanf Scanf.Scanning.stdin " %d" (fun x -> x)
  in let c = getNumber ()
  in let o = getNumber ()
  in let c1 = o - 1
  in let c2 = c - c1
  in let c2m = c2 mod 2
  in if c < 0 || o <= 0 || c - o < -1 || c2m = 1 then
    Printf.printf "No"
  else
    Printf.printf "Yes"
;;

main ();;

let main () =
  let getNumber () = Scanf.bscanf Scanf.Scanning.stdin " %d" (fun x -> x)
  in let c = getNumber ()
  in let o = getNumber ()
  in if o = 0 then
    Printf.printf "No"
  else if o = 1
    then if c = 0 then
      Printf.printf "Yes"
    else
      Printf.printf "No"
  else if c - o >= -1 && c - o + 1 mod 2 = 0 then
    Printf.printf "Yes"
  else
    Printf.printf "No"
;;

main ();;

let main () =
  let getNumber () = Scanf.bscanf Scanf.Scanning.stdin " %d" (fun x -> x)
  in let c = getNumber ()
  in let o = getNumber ()
  in let c1 = o - 1
  in let c2 = c - c1
  in let c2m = c2 mod 2
  in if c2m = 1 then
    Printf.printf "No"
  else
    Printf.printf "Yes"
;;

main ();;

let main () =
  let getNumber () = Scanf.bscanf Scanf.Scanning.stdin " %d" (fun x -> x)
  in let c = getNumber ()
  in let o = getNumber ()
  in let c1 = o - 1
  in let c2 = c - c1
  in let c2m = c2 mod 2
  in if c2 < 0 || o <= 0 || c - o < -1 || (c - o + 1) mod 2 = 1 then
    Printf.printf "No"
  else
    Printf.printf "Yes"
;;

main ();;

(* Codeforces 914 B Conan and Agasa play a Card Game - not done*)

(* you can use either gr or rdln but not both *)
let gr () = Scanf.scanf " %d" (fun i -> i);;
let grf () = Scanf.scanf " %f" (fun i -> i);;
let grl () = Scanf.scanf " %Ld" (fun i -> i);;
let grc () = Scanf.scanf " %c" (fun i -> i);;
let rdln() = input_line stdin;;
(* let spli s = Str.split (Str.regexp " ") s;; *)
let printlisti li = List.iter (fun i -> (print_int i; print_string " ")) li;;
let printarri ai = Array.iter (fun i -> (print_int i; print_string " ")) ai;;
let debug = false;;

let rec readlist n acc = match n with
	| 0 -> acc
	| _ -> readlist (n -1) (gr() :: acc);;

let printlisti li = List.iter (fun i -> (print_int i; print_string " ")) li;;

let possible x y =
	if x < (y - 1) then false
	else if (x mod 2) == (y mod 2) then false
	else true;;

let main() =
	let x = gr() in
	let y = gr() in
	let pos = possible x y in
	begin
		print_string (if pos then "Yes" else "No");
		print_string "\n"
	end;;

main();;

(* Codeforces 914 B Conan and Agasa play a Card Game - not done*)

(* you can use either gr or rdln but not both *)
let gr () = Scanf.scanf " %d" (fun i -> i);;
let grf () = Scanf.scanf " %f" (fun i -> i);;
let grl () = Scanf.scanf " %Ld" (fun i -> i);;
let grc () = Scanf.scanf " %c" (fun i -> i);;
let rdln() = input_line stdin;;
(* let spli s = Str.split (Str.regexp " ") s;; *)
let printlisti li = List.iter (fun i -> (print_int i; print_string " ")) li;;
let printarri ai = Array.iter (fun i -> (print_int i; print_string " ")) ai;;
let debug = false;;

let rec readlist n acc = match n with
	| 0 -> acc
	| _ -> readlist (n -1) (gr() :: acc);;

let printlisti li = List.iter (fun i -> (print_int i; print_string " ")) li;;

let possible x y =
	if y <= 0 then false
	else if x==2 && y==1 then false
	else if x < (y - 1) then false
	else if (x mod 2) == (y mod 2) then false
	else true;;

let main() =
	let x = gr() in
	let y = gr() in
	let pos = possible x y in
	begin
		print_string (if pos then "Yes" else "No");
		print_string "\n"
	end;;

main();;

(* Codeforces 914 B Conan and Agasa play a Card Game - not done*)

(* you can use either gr or rdln but not both *)
let gr () = Scanf.scanf " %d" (fun i -> i);;
let grf () = Scanf.scanf " %f" (fun i -> i);;
let grl () = Scanf.scanf " %Ld" (fun i -> i);;
let grc () = Scanf.scanf " %c" (fun i -> i);;
let rdln() = input_line stdin;;
(* let spli s = Str.split (Str.regexp " ") s;; *)
let printlisti li = List.iter (fun i -> (print_int i; print_string " ")) li;;
let printarri ai = Array.iter (fun i -> (print_int i; print_string " ")) ai;;
let debug = false;;

let rec readlist n acc = match n with
	| 0 -> acc
	| _ -> readlist (n -1) (gr() :: acc);;

let printlisti li = List.iter (fun i -> (print_int i; print_string " ")) li;;

let possible x y =
	if y <= 0 then false
	else if x < (y - 1) then false
	else if (x mod 2) == (y mod 2) then false
	else true;;

let main() =
	let x = gr() in
	let y = gr() in
	let pos = possible x y in
	begin
		print_string (if pos then "Yes" else "No");
		print_string "\n"
	end;;

main();;


let input () = Scanf.scanf "%Ld" (fun n -> n)

let solve number =
    let rec loop i count correct =
        if i > Int64.one
        then
            let repress = Int64.mul (Int64.sub i (Int64.of_int 2)) correct in
            let temp_count = Int64.add i repress in
            loop (Int64.pred i) (Int64.add count temp_count) (Int64.succ correct)
        else
            Int64.succ count
    in loop number Int64.zero Int64.one

let print result = Printf.printf "%Ld\n" result
let () = print (solve (input ()))

let ( +: ) = Int64.add in
let ( -: ) = Int64.sub in
let ( *: ) = Int64.mul in
let n = read_line () |> int_of_string |> Int64.of_int in
let rec count n i a =
  match n with
  | 1L -> 1L
  | 2L -> 3L
  | e -> if n-:i =2L then  a+:n+:1L  else count n (i+:1L) (a+:(i+:1L)*:(n-:i)-:i)  in
count n 1L n |> Int64.to_string |> print_string

let ( * ) = Int64.mul
let ( + ) = Int64.add
let ( - ) = Int64.sub
let zero = Int64.zero
let one = Int64.one
let two = Int64.of_int 2

let input () = Scanf.scanf "%Ld" (fun n -> n)

let solve number =
    let rec loop i count correct =
        if i > one
        then
            let repress = (i - two) * correct in
            let temp_count = i + repress in
            loop (i - one) (count + temp_count) (correct + one)
        else
            count + one
    in loop number zero one

let print result = Printf.printf "%Ld\n" result
let () = print (solve (input ()))

let input () = Scanf.scanf "%d" (fun n -> n)

let solve number =
    let rec loop i count correct =
        if i > 1
        then
            let repress = (i - 2) * correct in
            loop (i - 1) (count + i + repress) (correct + 1)
        else
            count + 1
    in loop number 0 1

let print result = Printf.printf "%d\n" result
let () = print (solve (input ()))

let n = read_line () |> int_of_string in
let rec count n a = if n <= 1 then a else count (n-2) (a+n*(n-1)) in
count n (if n==2 || n mod 2 ==1 then 1 else 0) |> print_int

let n = read_line () |> int_of_string in
let rec count n a = if n <= 1 then a else count (n-2) (a+n*(n-1)) in
print_int (if n==2 then 3 else count n 0)

let n = read_line () |> int_of_string in
let rec count n i a =
  match n with
  | 1 -> 1
  | 2 -> 3
  | e -> if n-i=2 then  a+n+1  else count n (i+1) (a+(i+1)*(n-i)-i) in
count n 1 n |> print_int

let n = read_line () |> int_of_string in
let count = ref 0 in
begin
for i = 1 to n do
  count := !count + (i+1)*(n-i)
done;
print_int (if n == 2 then 3 else !count)
end


let ( |> ) v f = f v
let ( @@ ) f x = f x
let input_to_list ic =
  let buf = Buffer.create 0 in
  let rec aux acc =
    match input_char ic with
    | ' ' -> let v = int_of_string (Buffer.contents buf) in
      Buffer.clear buf; aux (v::acc)
    | '\n' -> let v = int_of_string (Buffer.contents buf) in
      Buffer.clear buf; List.rev (v::acc)
    | c -> Buffer.add_char buf c; aux acc
  in aux []

let read_input () =
  let cups = input_to_list stdin |> List.fold_left (fun sum x -> sum + x) 0 in
  let medals = input_to_list stdin |> List.fold_left (fun sum x -> sum + x) 0 in
  let shelves = int_of_string (input_line stdin) in
  (cups, medals, shelves)

let check_ok (cups, medals, shelves) =
    let shelves_for_cups = cups / 5 + (if cups mod 5 > 0 then 1 else 0)
    in let shelves_for_medals = medals / 10 + (if medals mod 10 > 0 then 1 else 0)
    in shelves_for_cups + shelves_for_medals <= shelves

let () =
    print_endline (if (check_ok (read_input ())) then "YES" else "NO")

let read () = Scanf.scanf "%d " (fun n -> n)
let sum () = Scanf.scanf "%d %d %d " (fun n m l -> n + m + l)
let print result = Printf.printf "%s\n" result

let div_rounding_up = (fun x y ->
    x / y + (match x mod y with
        | 0 -> 0
        | _ -> 1))

let input () =
    let goblets = sum () in
    let medals = sum () in
    let shelves = read () in
    (goblets, medals, shelves)

let solve (goblets, medals, shelves) =
    let goblet_shelves = div_rounding_up goblets 5 in
    let medal_shelves = div_rounding_up medals 10 in
    let shelves_needed = goblet_shelves + medal_shelves in
        if shelves_needed <= shelves
        then
            "YES"
        else
            "NO"

let () = print (solve (input ()))

let input_to_list ic =
  let buf = Buffer.create 0 in
  let rec aux acc =
    match input_char ic with
    | ' ' -> let v = int_of_string (Buffer.contents buf) in
      Buffer.clear buf; aux (v::acc)
    | '\n' -> let v = int_of_string (Buffer.contents buf) in
      Buffer.clear buf; List.rev (v::acc)
    | c -> Buffer.add_char buf c; aux acc
  in aux []

let read_input () =
  let cups = input_to_list stdin in
  let medals = input_to_list stdin in
  let shelves = int_of_string (input_line stdin) in
  (cups, medals, shelves)

let check_ok (cups, medals, shelves) =
    let shelves_for_cups =
        (List.length cups) / 5 + (if List.length cups mod 5 > 0 then 1 else 0)
    in let shelves_for_medals =
        (List.length medals) / 10 + (if List.length medals mod 10 > 0 then 1 else 0)
    in shelves_for_cups + shelves_for_medals <= shelves

let () =
    print_endline (if (check_ok (read_input ())) then "YES" else "NO")