namespace AtCoder; #nullable enable using System.Numerics; static class Extensions { public static T[] Repeat(this int time, Func F) => Enumerable.Range(0, time).Select(_ => F()).ToArray(); public static long TernarySearch(long l, long r, Func F) where T: IComparable { if (l > r) (l, r) = (r, l); while (r - l > 3) { var w = (r - l) / 3; if (F(l + w).CompareTo(F(r - w)) > 0) l += w; else r -= w; } var res = r; var v = F(r); for (var i = l; i < r; i++) { var c = F(i); if (v.CompareTo(c) > 0) { v = c; res = i; } } return res; } } class AtCoder { object? Solve() { var n = Int(); var max = 1000000000L; var min = -max; long F1(long q) { Out($"1 {q} {max}"); sw.Flush(); return Input(); } var x = Extensions.TernarySearch(min, max, F1); long F2(long q) { Out($"1 {x} {q}"); sw.Flush(); return Input(); } var y = Extensions.TernarySearch(min, max, F2); return $"2 {x} {y}"; } public static void Main() => new AtCoder().Run(); public void Run() { var res = Solve(); if (res != null) { if (res is bool yes) res = yes ? "Yes" : "No"; sw.WriteLine(res); } sw.Flush(); } string[] input = Array.Empty(); int iter = 0; readonly StreamWriter sw = new(Console.OpenStandardOutput()) { AutoFlush = false }; string String() { while (iter >= input.Length) (input, iter) = (Console.ReadLine()!.Split(' '), 0); return input[iter++]; } T Input() where T : IParsable => T.Parse(String(), null); int Int() => Input(); void Out(object? x, string? separator = null) { separator ??= Environment.NewLine; if (x is System.Collections.IEnumerable obj and not string) { var firstLine = true; foreach (var item in obj) { if (!firstLine) sw.Write(separator); firstLine = false; sw.Write(item); } } else sw.Write(x); sw.WriteLine(); } }