using System;
using System.Linq;
class Program{
	static void Main(){
		int n = int.Parse(Console.ReadLine());

		int [] a   = Console.ReadLine().Split().Select(int.Parse).ToArray();

		int del = (int)Math.Abs(a[0] - a[n - 1]);
		int x = 1;
		int y = n;
		for(int i = 1; i < n; i++){
			if((int)Math.Abs(a[i - 1] - a[i]) < del){
				del = (int)Math.Abs(a[i - 1] - a[i]);
				x = i;
				y = i + 1;
			}
		}
		Console.WriteLine("{0} {1}", x, y);
	}
}


using System;
using System.Linq;
class Program{
    static void Main(){
        int n = int.Parse(Console.ReadLine());
        int [] i_a = new int[n];
        for(int k = 0; k < n; k++){i_a[k] = k;}
        int [] a   = Console.ReadLine().Split().Select(int.Parse).ToArray();
        Array.Sort(a, i_a);

        int del = 1000;
        int x = 0;
        int y = 0;
        for(int i = 0; i < n; i++){
            for(int j = 0; j < n; j++){
                if(i != j){
                    if((int)Math.Abs(a[i] - a[j]) < del){
                        del = (int)Math.Abs(a[i] - a[j]);
                        x = i;
                        y = j;
                    }
                }
            }
        }
        Console.WriteLine("{0} {1}",i_a[x] + 1, i_a[y] + 1);
    }
}


using System;
using System.Collections.Generic;

namespace Codeforces {
	class MyClass {
		public static void Main (string[] args)
		{
			System.Threading.Thread.CurrentThread.CurrentUICulture
				= new System.Globalization.CultureInfo("ja-JP");
			int n = int.Parse(Console.ReadLine());
			int[] h = new int[n];
			string[] ss = Console.ReadLine().Split(' ');
			for (int i=0; i<n; i++) {
				h[i] = int.Parse(ss[i]);
			}
			int min = Math.Abs(h[0]-h[n-1]);
			int x1 = n-1, x2 = 0;
			for (int i=0; i<n-1; i++) {
				int t = Math.Abs(h[i]-h[i+1]);
				if (t < min) {
					min = t;
					x1 = i;
					x2 = i+1;
				}
			}
			Console.WriteLine("{0} {1}", x1+1, x2+1);
		}
	}
}


using System;
using System.Collections.Generic;

namespace Codeforces {
	class MyClass {
		public static void Main (string[] args)
		{
			System.Threading.Thread.CurrentThread.CurrentUICulture
				= new System.Globalization.CultureInfo("ja-JP");
			int n = int.Parse(Console.ReadLine());
			int[] h = new int[n];
			string[] ss = Console.ReadLine().Split(' ');
			for (int i=0; i<n; i++) {
				h[i] = int.Parse(ss[i]);
			}
			int min = Math.Abs(h[0]-h[n-1]);
			int x1 = n-1, x2 = 0;
			for (int i=0; i<n-1; i++) {
				int t = Math.Abs(h[i]-h[i+1]);
				if (t < min) {
					min = t;
					x1 = i;
					x2 = i+1;
				}
			}
			Console.WriteLine("{0} {1}", x1, x2);
		}
	}
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProgrammingContest.Codeforces.Round34
{
    class A
    {
        public static void Main()
        {
            Scanner scanner = Scanner.FromConsole(Scanner.Option.Buffering);
            int n  =scanner.NextInt();
            int[] xs = scanner.NextInts(n);
            int d = int.MaxValue, x = -1;
            for (int i = 0; i < n; i++)
            {
                int j = (i + 1) % n;
                if (Math.Abs(xs[i] - xs[j]) < d)
                {
                    x = i; d = Math.Abs(xs[i] - xs[j]);
                }
            }
            Console.WriteLine("{0} {1}", x + 1, (x + 1) % n + 1);
        }

        #region Scanner
        public class Scanner
        {
            const int MAX_BUFFER_SIZE = 1024 * 1024 * 16;
            const string DELIMITER = " \r\n\t";

            System.IO.TextReader stream;
            int pos = 0, len = 0;
            bool endStream = false;
            int BufferSize = MAX_BUFFER_SIZE;
            char[] buffer = new char[MAX_BUFFER_SIZE];

            public enum Option { Buffering, NoBuffering }

            public Scanner(System.IO.TextReader stream, Option bufferingOption)
            {
                this.stream = stream;
                if (bufferingOption == Option.NoBuffering) BufferSize = 1;
            }

            void ReadBuffer()
            {
                pos = 0;
                len = stream.ReadBlock(buffer, 0, BufferSize);
                endStream = len == 0;
            }

            void SkipDelimiter()
            {
                while (!endStream && IsDelimiter(Peek())) NextChar();
            }

            static bool IsDelimiter(char c)
            {
                return DELIMITER.Contains(c);
            }

            bool Continue(char c)
            {
                return !endStream && !IsDelimiter(c);
            }

            char Peek()
            {
                if (pos >= len) ReadBuffer();
                return buffer[pos];
            }

            public char NextChar()
            {
                if (pos >= len) ReadBuffer();
                return buffer[pos++];
            }

            public string NextString()
            {
                SkipDelimiter();
                StringBuilder res = new StringBuilder();
                for (char c = NextChar(); Continue(c); c = NextChar()) res.Append(c);
                return res.ToString();
            }

            public int NextInt()
            {
                SkipDelimiter();
                int res = 0;
                char c = NextChar();
                int sign = 1;
                if (c == '-') { sign = -1; c = NextChar(); }
                for (; Continue(c); c = NextChar())
                    res = res * 10 + (c - '0');
                return sign * res;
            }

            public long NextLong()
            {
                SkipDelimiter();
                long res = 0;
                char c = NextChar();
                long sign = 1;
                if (c == '-') { sign = -1; c = NextChar(); }
                for (; Continue(c); c = NextChar())
                    res = res * 10 + (c - '0');
                return sign * res;
            }

            public int[] NextInts(int n)
            {
                int[] res = new int[n];
                for (int i = 0; i < n; i++) res[i] = NextInt();
                return res;
            }

            public long[] NextLongs(int n)
            {
                long[] res = new long[n];
                for (int i = 0; i < n; i++) res[i] = NextLong();
                return res;
            }

            public string[] NextStrings(int n)
            {
                string[] res = new string[n];
                for (int i = 0; i < n; i++) res[i] = NextString();
                return res;
            }

            public static Scanner FromString(string s, Option bufferingOption)
            {
                return new Scanner(new System.IO.StreamReader(new System.IO.MemoryStream(Encoding.ASCII.GetBytes(s))), bufferingOption);
            }

            public static Scanner FromFile(string path, Option bufferingOption)
            {
                return new Scanner(new System.IO.StreamReader(path), bufferingOption);
            }

            public static Scanner FromConsole(Option bufferingOption)
            {
                return new Scanner(Console.In, bufferingOption);
            }
        }
        #endregion
    }
}


using System;
using System.Globalization;
using System.Linq;

namespace Task_34A
{
    class Program
    {
        /*
         5
         10 12 13 15 10
         */
        static void Main()
        {

            int n =Convert.ToInt32(Console.ReadLine());
            int[] cont = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int minDiff = Math.Abs(cont[0]-cont[n-1]), ind1 = 1, ind2 = n;
            for (int i=0; i<n-1; i++)
            {
                int helper = Math.Abs(cont[i] - cont[i + 1]);
                if (helper < minDiff)
                {
                    minDiff = helper;
                    ind1 = i + 1;
                    ind2 = i + 2;
                }

            }
            Console.WriteLine("{0} {1}", ind1, ind2);
        }

    }
}


//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;

//namespace ConsoleApplication1
//{
//    class Program
//    {

//        static void Main(string[] args)
//        {
//            int A = Int32.Parse(Console.ReadLine());
//            List<int> Values = new List<int>();
//            for (int i = 2; i < A; i++)
//            {
//                int baseN = i;
//                List<int> subValues = new List<int>();
//                int val = A;
//                while (val > 0)
//                {
//                    int maxPow = (int) Math.Log(val, baseN);
//                    for (int j = maxPow; j >= 0; j--)
//                    {

//                    }
//                }

//                Values.Add(subValues.Sum());
//            }

//            Console.WriteLine(Values.Sum()+"/"+Values.Count);
//        }
//    }

//}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            short n = short.Parse(Console.ReadLine());
            List<short> heights = Console.ReadLine().Split(' ').Select(x => short.Parse(x)).ToList();
            List<short> sortedHeights = heights; sortedHeights.Add(heights.First());

            List<string> diffH = new List<string>();

            for (int i = 0; i < sortedHeights.Count-1; i++)
            {
                diffH.Add(sortedHeights[i] + "|" + sortedHeights[i + 1] + ":" + Math.Abs(sortedHeights[i] - sortedHeights[i + 1]));
            }

            short[] diffH1 = diffH.OrderBy(x => Int32.Parse(x.Split(':')[1])).First().Split(':')[0].Split('|').Select(x=>short.Parse(x)).ToArray();

            //int shortIndex = heights.IndexOf(sortedHeights[0]) + 1; heights.Remove(sortedHeights[0]); sortedHeights.RemoveAt(0);
            //int longIndex = heights.IndexOf(sortedHeights[0]) + 2;

            int shortIndex = heights.IndexOf(diffH1[0]) + 1; heights.Remove(diffH1[0]); sortedHeights.Remove(diffH1[0]);
            int longIndex = heights.IndexOf(diffH1[1]) + 2;

            Console.WriteLine(shortIndex + " " + longIndex);
        }

        // Problem 34B
        //static void Main(string[] args)
        //{
        //    int[] reader = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).ToArray();
        //    int n = reader[0], m = reader[1];
        //    int output = 0;

        //    int[] TVs = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).OrderBy(x => x).ToArray();
        //    for (int i = 0; i < m; i++)
        //    {
        //        output -= TVs[i];
        //    }

        //    Console.WriteLine(output);
        //}

        /* problem 35 A
        static void Main(string[] args)
        {
            int _output = int.Parse(Console.ReadLine());

            int[][] shuffles = new int[3][];
            shuffles[0] = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            shuffles[1] = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            shuffles[2] = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();

            if (shuffles[0].Contains(_output))
            {
                _output = shuffles[0].Where(x => x != _output).First();
            }
            if (shuffles[1].Contains(_output))
            {
                _output = shuffles[1].Where(x => x != _output).First();
            }
            if (shuffles[2].Contains(_output))
            {
                _output = shuffles[2].Where(x => x != _output).First();
            }

            Console.WriteLine(_output);
        }

            */

        // Jalal
        static bool valueInBetween(double d, int min, double max)
        {
            return d >= min && d <= max;
        }
        static void Problem1245A()
        {
            byte t = byte.Parse(Console.ReadLine());
            for (byte i = 0; i < t; i++)
            {
                UInt16 a, b;
                UInt16[] reader = Console.ReadLine().Split(' ').Select(x => UInt16.Parse(x)).ToArray();
                a = reader[0]; b = reader[1];
                FindAnswer(a, b);
            }
        }
        static void FindAnswer(UInt16 a, UInt16 b)
        {
            string output = "";

            Console.WriteLine(output);
        }
    }

}


//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;

//namespace ConsoleApplication1
//{
//    class Program
//    {

//        static void Main(string[] args)
//        {
//            int A = Int32.Parse(Console.ReadLine());
//            List<int> Values = new List<int>();
//            for (int i = 2; i < A; i++)
//            {
//                int baseN = i;
//                List<int> subValues = new List<int>();
//                int val = A;
//                while (val > 0)
//                {
//                    int maxPow = (int) Math.Log(val, baseN);
//                    for (int j = maxPow; j >= 0; j--)
//                    {

//                    }
//                }

//                Values.Add(subValues.Sum());
//            }

//            Console.WriteLine(Values.Sum()+"/"+Values.Count);
//        }
//    }

//}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            short n = short.Parse(Console.ReadLine());
            List<short> heights = Console.ReadLine().Split(' ').Select(x => short.Parse(x)).ToList();
            List<short> sortedHeights = heights.Select(x=>x).ToList(); sortedHeights.Add(heights.First());

            List<string> diffH = new List<string>();

            for (int i = 0; i < sortedHeights.Count-1; i++)
            {
                diffH.Add(sortedHeights[i] + "|" + sortedHeights[i + 1] + ":" + Math.Abs(sortedHeights[i] - sortedHeights[i + 1]));
            }

            short[] diffH1 = diffH.OrderBy(x => Int32.Parse(x.Split(':')[1])).First().Split(':')[0].Split('|').Select(x=>short.Parse(x)).ToArray();

            //int shortIndex = heights.IndexOf(sortedHeights[0]) + 1; heights.Remove(sortedHeights[0]); sortedHeights.RemoveAt(0);
            //int longIndex = heights.IndexOf(sortedHeights[0]) + 2;

            int shortIndex = heights.IndexOf(diffH1[0]) + 1; heights.Remove(diffH1[0]); sortedHeights.Remove(diffH1[0]);
            int longIndex = heights.IndexOf(diffH1[1]) + 2;

            Console.WriteLine(shortIndex + " " + longIndex);
        }

        // Problem 34B
        //static void Main(string[] args)
        //{
        //    int[] reader = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).ToArray();
        //    int n = reader[0], m = reader[1];
        //    int output = 0;

        //    int[] TVs = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).OrderBy(x => x).ToArray();
        //    for (int i = 0; i < m; i++)
        //    {
        //        output -= TVs[i];
        //    }

        //    Console.WriteLine(output);
        //}

        /* problem 35 A
        static void Main(string[] args)
        {
            int _output = int.Parse(Console.ReadLine());

            int[][] shuffles = new int[3][];
            shuffles[0] = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            shuffles[1] = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            shuffles[2] = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();

            if (shuffles[0].Contains(_output))
            {
                _output = shuffles[0].Where(x => x != _output).First();
            }
            if (shuffles[1].Contains(_output))
            {
                _output = shuffles[1].Where(x => x != _output).First();
            }
            if (shuffles[2].Contains(_output))
            {
                _output = shuffles[2].Where(x => x != _output).First();
            }

            Console.WriteLine(_output);
        }

            */

        // Jalal
        static bool valueInBetween(double d, int min, double max)
        {
            return d >= min && d <= max;
        }
        static void Problem1245A()
        {
            byte t = byte.Parse(Console.ReadLine());
            for (byte i = 0; i < t; i++)
            {
                UInt16 a, b;
                UInt16[] reader = Console.ReadLine().Split(' ').Select(x => UInt16.Parse(x)).ToArray();
                a = reader[0]; b = reader[1];
                FindAnswer(a, b);
            }
        }
        static void FindAnswer(UInt16 a, UInt16 b)
        {
            string output = "";

            Console.WriteLine(output);
        }
    }

}


//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;

//namespace ConsoleApplication1
//{
//    class Program
//    {

//        static void Main(string[] args)
//        {
//            int A = Int32.Parse(Console.ReadLine());
//            List<int> Values = new List<int>();
//            for (int i = 2; i < A; i++)
//            {
//                int baseN = i;
//                List<int> subValues = new List<int>();
//                int val = A;
//                while (val > 0)
//                {
//                    int maxPow = (int) Math.Log(val, baseN);
//                    for (int j = maxPow; j >= 0; j--)
//                    {

//                    }
//                }

//                Values.Add(subValues.Sum());
//            }

//            Console.WriteLine(Values.Sum()+"/"+Values.Count);
//        }
//    }

//}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            short n = short.Parse(Console.ReadLine());
            List<short> heights = Console.ReadLine().Split(' ').Select(x => short.Parse(x)).ToList();
            List<short> sortedHeights = heights.Select(x=>x).ToList(); sortedHeights.Add(heights.First());

            List<string> diffH = new List<string>();

            for (int i = 0; i < sortedHeights.Count-1; i++)
            {
                diffH.Add(sortedHeights[i] + "|" + sortedHeights[i + 1] + ":" + Math.Abs(sortedHeights[i] - sortedHeights[i + 1]));
            }

            short[] diffH1 = diffH.OrderBy(x => Int32.Parse(x.Split(':')[1])).First().Split(':')[0].Split('|').Select(x=>short.Parse(x)).ToArray();

            //int shortIndex = heights.IndexOf(sortedHeights[0]) + 1; heights.Remove(sortedHeights[0]); sortedHeights.RemoveAt(0);
            //int longIndex = heights.IndexOf(sortedHeights[0]) + 2;

            int shortIndex = heights.IndexOf(diffH1[0]) + 1; heights[shortIndex-1] = -999;
            int longIndex = heights.IndexOf(diffH1[1]) + 1;

            Console.WriteLine(shortIndex + " " + longIndex);
        }

        // Problem 34B
        //static void Main(string[] args)
        //{
        //    int[] reader = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).ToArray();
        //    int n = reader[0], m = reader[1];
        //    int output = 0;

        //    int[] TVs = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).OrderBy(x => x).ToArray();
        //    for (int i = 0; i < m; i++)
        //    {
        //        output -= TVs[i];
        //    }

        //    Console.WriteLine(output);
        //}

        /* problem 35 A
        static void Main(string[] args)
        {
            int _output = int.Parse(Console.ReadLine());

            int[][] shuffles = new int[3][];
            shuffles[0] = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            shuffles[1] = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            shuffles[2] = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();

            if (shuffles[0].Contains(_output))
            {
                _output = shuffles[0].Where(x => x != _output).First();
            }
            if (shuffles[1].Contains(_output))
            {
                _output = shuffles[1].Where(x => x != _output).First();
            }
            if (shuffles[2].Contains(_output))
            {
                _output = shuffles[2].Where(x => x != _output).First();
            }

            Console.WriteLine(_output);
        }

            */

        // Jalal
        static bool valueInBetween(double d, int min, double max)
        {
            return d >= min && d <= max;
        }
        static void Problem1245A()
        {
            byte t = byte.Parse(Console.ReadLine());
            for (byte i = 0; i < t; i++)
            {
                UInt16 a, b;
                UInt16[] reader = Console.ReadLine().Split(' ').Select(x => UInt16.Parse(x)).ToArray();
                a = reader[0]; b = reader[1];
                FindAnswer(a, b);
            }
        }
        static void FindAnswer(UInt16 a, UInt16 b)
        {
            string output = "";

            Console.WriteLine(output);
        }
    }

}


//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;

//namespace ConsoleApplication1
//{
//    class Program
//    {

//        static void Main(string[] args)
//        {
//            int A = Int32.Parse(Console.ReadLine());
//            List<int> Values = new List<int>();
//            for (int i = 2; i < A; i++)
//            {
//                int baseN = i;
//                List<int> subValues = new List<int>();
//                int val = A;
//                while (val > 0)
//                {
//                    int maxPow = (int) Math.Log(val, baseN);
//                    for (int j = maxPow; j >= 0; j--)
//                    {

//                    }
//                }

//                Values.Add(subValues.Sum());
//            }

//            Console.WriteLine(Values.Sum()+"/"+Values.Count);
//        }
//    }

//}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            short n = short.Parse(Console.ReadLine());
            List<short> heights = Console.ReadLine().Split(' ').Select(x => short.Parse(x)).ToList();
            List<short> sortedHeights = heights.OrderBy(x=> x).ToList();
            int shortIndex = heights.IndexOf(sortedHeights[0]) + 1; heights.Remove(sortedHeights[0]); sortedHeights.RemoveAt(0);
            int longIndex = heights.IndexOf(sortedHeights[0]) + 2;

            Console.WriteLine(shortIndex+" " + longIndex);
        }

        // Problem 34B
        //static void Main(string[] args)
        //{
        //    int[] reader = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).ToArray();
        //    int n = reader[0], m = reader[1];
        //    int output = 0;

        //    int[] TVs = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).OrderBy(x => x).ToArray();
        //    for (int i = 0; i < m; i++)
        //    {
        //        output -= TVs[i];
        //    }

        //    Console.WriteLine(output);
        //}

        /* problem 35 A
        static void Main(string[] args)
        {
            int _output = int.Parse(Console.ReadLine());

            int[][] shuffles = new int[3][];
            shuffles[0] = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            shuffles[1] = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            shuffles[2] = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();

            if (shuffles[0].Contains(_output))
            {
                _output = shuffles[0].Where(x => x != _output).First();
            }
            if (shuffles[1].Contains(_output))
            {
                _output = shuffles[1].Where(x => x != _output).First();
            }
            if (shuffles[2].Contains(_output))
            {
                _output = shuffles[2].Where(x => x != _output).First();
            }

            Console.WriteLine(_output);
        }

            */

        // Jalal
        static bool valueInBetween(double d, int min, double max)
        {
            return d >= min && d <= max;
        }
        static void Problem1245A()
        {
            byte t = byte.Parse(Console.ReadLine());
            for (byte i = 0; i < t; i++)
            {
                UInt16 a, b;
                UInt16[] reader = Console.ReadLine().Split(' ').Select(x => UInt16.Parse(x)).ToArray();
                a = reader[0]; b = reader[1];
                FindAnswer(a, b);
            }
        }
        static void FindAnswer(UInt16 a, UInt16 b)
        {
            string output = "";

            Console.WriteLine(output);
        }
    }

}


//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;

//namespace ConsoleApplication1
//{
//    class Program
//    {

//        static void Main(string[] args)
//        {
//            int A = Int32.Parse(Console.ReadLine());
//            List<int> Values = new List<int>();
//            for (int i = 2; i < A; i++)
//            {
//                int baseN = i;
//                List<int> subValues = new List<int>();
//                int val = A;
//                while (val > 0)
//                {
//                    int maxPow = (int) Math.Log(val, baseN);
//                    for (int j = maxPow; j >= 0; j--)
//                    {

//                    }
//                }

//                Values.Add(subValues.Sum());
//            }

//            Console.WriteLine(Values.Sum()+"/"+Values.Count);
//        }
//    }

//}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            short n = short.Parse(Console.ReadLine());
            List<short> heights = Console.ReadLine().Split(' ').Select(x => short.Parse(x)).ToList();
            List<short> sortedHeights = heights.Select(x=>x).ToList(); sortedHeights.Add(heights.First());

            List<string> diffH = new List<string>();

            for (int i = 0; i < sortedHeights.Count-1; i++)
            {
                //diffH.Add(sortedHeights[i] + "|" + sortedHeights[i + 1] + ":" + Math.Abs(sortedHeights[i] - sortedHeights[i + 1]));
                int smallIndex = i+1; int bigIndex = i == sortedHeights.Count - 2 ? 1 : i + 2;
                diffH.Add(smallIndex + " " + bigIndex + ":" + Math.Abs(sortedHeights[i] - sortedHeights[i + 1]));
            }

            string diffH1 = "";
            if (n == 2) { diffH1 = "1 2"; }
            else
            { diffH1 = diffH.OrderBy(x => Int32.Parse(x.Split(':')[1])).First().Split(':')[0]; }

            //int shortIndex = heights.IndexOf(sortedHeights[0]) + 1; heights.Remove(sortedHeights[0]); sortedHeights.RemoveAt(0);
            //int longIndex = heights.IndexOf(sortedHeights[0]) + 2;

            //int shortIndex = heights.IndexOf(diffH1[0]) + 1; heights[shortIndex-1] = -999;
            //int longIndex = heights.IndexOf(diffH1[1]) + 1;

            Console.WriteLine(diffH1);
        }

        // Problem 34B
        //static void Main(string[] args)
        //{
        //    int[] reader = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).ToArray();
        //    int n = reader[0], m = reader[1];
        //    int output = 0;

        //    int[] TVs = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).OrderBy(x => x).ToArray();
        //    for (int i = 0; i < m; i++)
        //    {
        //        output -= TVs[i];
        //    }

        //    Console.WriteLine(output);
        //}

        /* problem 35 A
        static void Main(string[] args)
        {
            int _output = int.Parse(Console.ReadLine());

            int[][] shuffles = new int[3][];
            shuffles[0] = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            shuffles[1] = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            shuffles[2] = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();

            if (shuffles[0].Contains(_output))
            {
                _output = shuffles[0].Where(x => x != _output).First();
            }
            if (shuffles[1].Contains(_output))
            {
                _output = shuffles[1].Where(x => x != _output).First();
            }
            if (shuffles[2].Contains(_output))
            {
                _output = shuffles[2].Where(x => x != _output).First();
            }

            Console.WriteLine(_output);
        }

            */

        // Jalal
        static bool valueInBetween(double d, int min, double max)
        {
            return d >= min && d <= max;
        }
        static void Problem1245A()
        {
            byte t = byte.Parse(Console.ReadLine());
            for (byte i = 0; i < t; i++)
            {
                UInt16 a, b;
                UInt16[] reader = Console.ReadLine().Split(' ').Select(x => UInt16.Parse(x)).ToArray();
                a = reader[0]; b = reader[1];
                FindAnswer(a, b);
            }
        }
        static void FindAnswer(UInt16 a, UInt16 b)
        {
            string output = "";

            Console.WriteLine(output);
        }
    }

}


using System;
using System.Linq;

namespace _34A
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            int[] cont = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int diff = Math.Abs(cont[0] - cont[N - 1]);
            string ans = "1 " + N;
            for (int i = 0; i < N - 1; i++)
            {
                if (Math.Abs(cont[i] - cont[i + 1]) < diff)
                {
                    ans = (i + 1) + " " + (i + 2);
                    diff = Math.Abs(cont[i] - cont[i + 1]);
                }
            }
            Console.WriteLine(ans);
            }
        }
}


using System;
using System.Linq;

namespace CSharp
{
    public class _34A
    {
        public static void Main()
        {
            int n = int.Parse(Console.ReadLine());
            int[] a = Console.ReadLine().Split().Select(token => int.Parse(token)).ToArray();

            int first = Enumerable.Range(0, n).OrderBy(i => Math.Abs(a[i] - a[(i + 1) % n])).First();
            int second = (first + 1) % n;

            Console.WriteLine(string.Join(" ", first + 1, second + 1));
        }
    }
}


// C# implementation of the approach
using System;
using System.Collections.Generic;

class GFG
{

    // Function to return the count of
    // required sub-strings
    static void Recon(int[] arr)
    {
        int n = arr.Length;

        var siff = Math.Abs(arr[0] - arr[n - 1]);
        int min = int.MaxValue;
        int index = 0;
        for (int i = 1; i < n; i++)
        {
            var diff = Math.Abs(arr[i - 1] - arr[i]);
            if (diff < min)
            {
                 min=diff;
                index = i - 1;
            }
        }

        if (min < siff)
        {
            Console.Write((index + 1) + " " + (index + 2));
        }
        else
        {
            Console.Write(1 + " " + n);
        }
    }

    // Driver code
    public static void Main(String[] args)
    {
       // var t = int.Parse(Console.ReadLine());

       // for (int f = 0; f < t; f++)
        {
            // string[] input1 = Console.ReadLine().Split(' ');
            var n = int.Parse(Console.ReadLine());
            int[] arr = new int[n];
            string[] input2 = Console.ReadLine().Split(' ');
            for (int i = 0; i < input2.Length; i++)
            {
                if (!string.IsNullOrEmpty(input2[i]))
                    arr[i] = int.Parse(input2[i]);
            }
            Recon(arr);

        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Collections;

namespace _43
{
    struct Point
    {
       public long l;
       public long r;
       public long x;

    };
    class Program
    {

        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string[] s = Console.ReadLine().Split(' ');
            int[] y = new int[n];
            for (int i = 0; i < n; i++)
            {
                y[i] = int.Parse(s[i]);
            }
            int[] r = new int[n];
            int min =int.MaxValue;
            string q = " ";
            for (int i = 0; i < n - 1; i++)
            {
                if (Math.Abs(y[i] - y[i + 1]) < min)
                {
                    min = Math.Abs(y[i] - y[i + 1]);
                    q = ((int)(i + 1)) + " " + ((int)(i + 2));

                }
            }
            if (Math.Abs(y[n-1] - y[0]) < min)
            {

                q =  "1 " + n;

            }
            Console.WriteLine(q);
            Console.ReadLine();

        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Codeforces34
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            int count = int.Parse(input);

            int record = 0;
            int number = 1;
            string[] input2 = Console.ReadLine().Split(' ');

            record = Math.Abs(int.Parse(input2[0]) - int.Parse(input2[1]));

            for (int i = 0; i < count; i++)
            {
                int difer = 0;
                if (i != count-1)
                {
                    difer = Math.Abs(int.Parse(input2[i]) - int.Parse(input2[i+1]));
                }
                else
                {
                    difer = Math.Abs(int.Parse(input2[0]) - int.Parse(input2[count-1]));
                }

                if (difer < record)
                {
                    record = difer;
                    number = i + 1;
                }
            }

            if (number == count)
            {
                Console.WriteLine(string.Format("{0} {1}", count, 1));
            }
            else
            {
                Console.WriteLine(string.Format("{0} {1}", number, number+1));
            }

        }
    }
}


using System;
using System.Linq;
namespace Task_34A
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] container = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();

            int index1 = 1, index2 = container.Length;
            int minDifference = Math.Abs(container[0] - container[container.Length - 1]);
            for (int i = 0; i < container.Length - 1; i++)
            {
                int difference = Math.Abs(container[i] - container[i + 1]);
                if (difference <= minDifference)
                {
                    minDifference = difference;
                    index1 = i + 1;
                    index2 = i + 2;
                }
            }

            Console.WriteLine(index1 + " " + index2);
            //Console.ReadKey();
        }
    }
}


using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace CodeForcesApp
{
    public class A
    {
        #region Shortcuts
        static string RL() { return Console.ReadLine(); }
        static string[] RSA() { return RL().Split(' '); }
        static int[] RIA() { return Array.ConvertAll<string, int>(RSA(), int.Parse); }
        static int RInt() { return int.Parse(RL()); }
        static long RLong() { return long.Parse(RL()); }
        static double RDouble() { return double.Parse(RL()); }
        static void RInts2(out int p1, out int p2) { int[] a = RIA(); p1 = a[0]; p2 = a[1]; }
        static void RInts3(out int p1, out int p2, out int p3) { int[] a = RIA(); p1 = a[0]; p2 = a[1]; p3 = a[2]; }

        static void Swap<T>(ref T a, ref T b) { T tmp = a; a = b; b = tmp; }
        static void Fill<T>(T[] d, T v) { for (int i = 0; i < d.Length; i++) d[i] = v; }
        static void Fill<T>(T[,] d, T v) { for (int i = 0; i < d.GetLength(0); i++) { for (int j = 0; j < d.GetLength(1); j++) { d[i, j] = v; } } }
        #endregion

        static void Main(string[] args)
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;

            //SolutionTester tester = new SolutionTester(CodeForcesTask.A);
            //tester.Test();

            Task task = new Task();
            task.Solve();
        }

        public class Task
        {
            public void Solve()
            {
                int n = RInt();
                int[] a = RIA();

                int min = Math.Abs(a[0] - a[1]);
                int f = 0;
                int t = 1;

                for (int i = 0; i < n; i++)
                {
                    int from = (i - 1 + n) % n;
                    int to = i;

                    if (Math.Abs(a[from] - a[to]) < min)
                    {
                        f = from;
                        t = to;
                        min = Math.Abs(a[from] - a[to]);
                    }

                    from = i;
                    to = (i + 1) % n;

                    if (Math.Abs(a[from] - a[to]) < min)
                    {
                        f = from;
                        t = to;
                        min = Math.Abs(a[from] - a[to]);
                    }
                }
                Console.WriteLine("{0} {1}", f + 1, t + 1);
            }
        }

    }
}


using System;
using System.Linq;
using System.Numerics;
using System.Text.RegularExpressions;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            int i;
            int diff = 1000000000;
            Console.ReadLine();
            int[] Soldiers = Console.ReadLine().Split().Select(x => Convert.ToInt32(x)).ToArray();
            int sold1 = 1, sold2 = Soldiers.Length;

            diff = Math.Abs(Soldiers[0] - Soldiers[Soldiers.Length-1]);

            for (i = 1; i < Soldiers.Length; i++)
            {
                if (Math.Abs(Soldiers[i] - Soldiers[i-1]) < diff)
                {
                    diff = Math.Abs(Soldiers[i] - Soldiers[i-1]);
                    sold1 = i+1;
                    sold2 = i;
                }
            }
            Console.WriteLine(sold1 + " " + sold2);
            //Console.Read();
        }
    }
}


using System;
using System.Linq;
using System.Text.RegularExpressions;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            int i;
            int diff = 1000000000;
            Console.ReadLine();
            int[] Soldiers = Console.ReadLine().Split().Select(x => Convert.ToInt32(x)).ToArray();
            int sold1 = 1, sold2 = Soldiers.Length;

            diff = Math.Abs(Soldiers[0] - Soldiers[Soldiers.Length-1]);

            for (i = 1; i < Soldiers.Length; i++)
            {
                if (Math.Abs(Soldiers[i] - Soldiers[i-1]) < diff)
                {
                    diff = Math.Abs(Soldiers[i] - Soldiers[i-1]);
                    sold1 = i+1;
                    sold2 = i;
                }
            }
            Console.WriteLine(sold1 + " " + sold2);
            //Console.Read();
        }
    }
}


using System;
using System.Linq;

namespace _34A
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            int[] cont = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int diff = Math.Abs(cont[0] - cont[N - 1]);
            string ans = "1 " + N;
            for (int i = 0; i < N - 1; i++)
            {
                if (Math.Abs(cont[i] - cont[i + 1]) < diff)
                {
                    ans = (i + 1) + " " + (i + 2);
                    diff = Math.Abs(cont[i] - cont[i + 1]);
                }
            }
            Console.WriteLine(ans);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
class Program
{
    static void Main()
    {
        Console.ReadLine();
        var v = Console.ReadLine().Split(' ').Select(x=>Convert.ToInt32(x)).ToArray();
        List<int> p = new List<int>();
        List<int> v1 = new List<int>();
        List<int> v2 = new List<int>();
        for (int i = 0; i < v.Length; i++)
        {
            p.Add(Math.Abs(v[i%v.Length] - v[(i+1) % v.Length]));
            v1.Add(i % v.Length);
            v2.Add((i + 1) % v.Length);

        }
        Console.WriteLine((v1[p.IndexOf(p.Min())] + 1) + " " + (1+v2[p.IndexOf(p.Min())]));
    }
}


//#define TEST
#if TEST
using System.IO;
#endif

using System;
using System.Text;

namespace CF
{
    #region Start
#if !TEST
    using cin = Console;
    using cout = Console;
#endif
#endregion
    class Program
    {
        static void Main(string[] args)
        {
            #region BEGIN
            #if TEST
            string filepath = @"E:\Projects 2010\CF55\B\";
            FileStream file = new FileStream(String.Concat(filepath, @"input.txt"), FileMode.Open, FileAccess.Read);
            StreamReader cin = new StreamReader(file);
            FileStream fileOut = new FileStream(String.Concat(filepath, @"output.txt"), FileMode.Truncate, FileAccess.Write);
            StreamWriter cout = new StreamWriter(fileOut, System.Text.Encoding.Unicode);
            #endif
            try
            {
            #endregion
                int n = int.Parse(cin.ReadLine());
                string[] str = cin.ReadLine().Split(' ');
                int[] a = new int[2 * n];
                for (int i = 0; i < n; i++)
                {
                    a[i] = int.Parse(str[i]);
                    a[n + i] = a[i];
                }
                int min = Math.Abs(a[0] - a[1]);
                int ind = 1;
                for(int i=0;i<2*n-1;i++)
                {
                    if (Math.Abs(a[i] - a[i + 1]) < min)
                    {
                        min=Math.Abs(a[i] - a[i + 1]);
                        ind=i+1;
                    }
                }

                if (ind < n)
                {
                    cout.WriteLine("{0} {1}", ind, ind + 1);
                }
                else
                {
                    if (ind > n)
                    {
                        cout.WriteLine("{0} {1}", ind-n, ind + 1-n);
                    }
                    else
                        cout.WriteLine("{0} {1}", 1, n);
                }
            #region END
            }

            catch (Exception e)
            {
                #if TEST
                cout.WriteLine(e.Message);
                cout.WriteLine("----------------------");
                cout.WriteLine(e.StackTrace);
                #endif
            }
            finally
            {
                #if TEST
                cout.Close();
                cin.Close();
                fileOut.Close();
                file.Close();
                #endif
            }
            #endregion
        }
    }
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using System.IO;
using System.Linq;
using System.Threading;

class Program
{

    void solve()
    {
        int n = nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = nextInt();
        int[] res = new int[3];
        res[2] = int.MaxValue;
        for (int i = 0; i < n; i++)
        {
            int j = (i + 1) % n;
            if (Math.Abs(a[j] - a[i]) < res[2])
                res = new int[] { i, j, Math.Abs(a[j] - a[i]) };
        }
        res[0]++;
        res[1]++;
        println(res[0] + " " + res[1]);
    }

    ////////////

    private void println(int[] ar)
    {
        for (int i = 0; i < ar.Length; i++)
        {
            if (i == ar.Length - 1)
                println(ar[i]);
            else
                print(ar[i] + " ");
        }
    }
    private void println(int[] ar, bool add)
    {
        int A = 0;
        if (add)
            A++;
        for (int i = 0; i < ar.Length; i++)
        {
            if (i == ar.Length - 1)
                println(ar[i] + A);
            else
                print((ar[i] + A) + " ");
        }
    }

    private void println(string Stringst)
    {
        Console.WriteLine(Stringst);
    }
    private void println(char charnum)
    {
        Console.WriteLine(charnum);
    }
    private void println(int Intnum)
    {
        Console.WriteLine(Intnum);
    }
    private void println(long Longnum)
    {
        Console.WriteLine(Longnum);
    }
    private void println(double Doublenum)
    {
        string s = Doublenum.ToString(CultureInfo.InvariantCulture);
        Console.WriteLine(s);
    }

    private void print(string Stringst)
    {
        Console.Write(Stringst);
    }
    private void print(int Intnum)
    {
        Console.Write(Intnum);
    }
    private void print(char charnum)
    {
        Console.Write(charnum);
    }
    private void print(long Longnum)
    {
        Console.Write(Longnum);
    }
    private void print(double Doublenum)
    {
        Console.Write(Doublenum);
    }

    string[] inputLine = new string[0];
    int inputInd = 0;
    string nextLine()
    {
        return Console.ReadLine();
    }
    void readInput()
    {
        if (inputInd != inputLine.Length)
            throw new Exception();
        inputInd = 0;
        inputLine = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
        if (inputLine.Length == 0)
            readInput();

    }
    int nextInt()
    {
        if (inputInd == inputLine.Length)
            readInput();
        return int.Parse(inputLine[inputInd++]);
    }
    long nextLong()
    {
        if (inputInd == inputLine.Length)
            readInput();
        return long.Parse(inputLine[inputInd++]);
    }
    double nextDouble()
    {
        if (inputInd == inputLine.Length)
            readInput();
        return double.Parse(inputLine[inputInd++]);
    }
    string nextString()
    {
        if (inputInd == inputLine.Length)
            readInput();
        return inputLine[inputInd++];
    }
    static void Main(string[] args)
    {
        Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
        new Program().solve();
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace A.Reconnaissance2
{
    class Program
    {
        static void Main(string[] args)
        {
            int soldierCount = int.Parse(Console.ReadLine());

            int[] heights = new int[soldierCount];
            string[] tokens = Console.ReadLine().Split(' ');

            for (int soldierIndex = 0; soldierIndex < soldierCount; soldierIndex++)
            {
                heights[soldierIndex] = int.Parse(tokens[soldierIndex]);
            }

            Result result = new Result(Math.Abs(heights[0] - heights[soldierCount - 1]), 0, soldierCount - 1);

            for (int soldierIndex = 1; soldierIndex < soldierCount; soldierIndex++)
            {
                int heightDifference = Math.Abs(heights[soldierIndex] - heights[soldierIndex - 1]);
                if (heightDifference >= result.heightDifference)
                {
                    continue;
                }

                result = new Result(heightDifference, soldierIndex, soldierIndex - 1);
            }

            Console.WriteLine("" + (result.firstSoldierIndex + 1) + " " + (result.secondSoldierIndex + 1));
        }

        class Result
        {
            public readonly int heightDifference;
            public readonly int firstSoldierIndex;
            public readonly int secondSoldierIndex;

            public Result(int heightDifference, int firstSoldierIndex, int secondSoldierIndex)
            {
                this.heightDifference = heightDifference;
                this.firstSoldierIndex = firstSoldierIndex;
                this.secondSoldierIndex = secondSoldierIndex;
            }
        }
    }
}


using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] sold = new int[n];
            string[] s = Console.ReadLine().Split(' ');
            for (int i = 0; i < n; i++)
            {
                sold[i] = int.Parse(s[i]);
            }
            int[] height = new int[n];
            height[0] =Math.Abs( sold[0] - sold[n-1]);
            for (int i = 1; i < n; i++)
            {
                height[i] = Math.Abs(sold[i - 1] - sold[i]);
            }
            int cnt = 1001;
            int num=0;
            for (int i = 0; i < n; i++)
            {
                if (height[i] < cnt)
                {
                    cnt = height[i];
                    num = i;
                }
            }
            if (num == 0)
            {
                Console.WriteLine("1" + " " + n.ToString());
            }
            else
            {
                Console.WriteLine(Convert.ToString(num - 1) + " " + Convert.ToString(num));
            }
        }
    }
}


using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] sold = new int[n];
            string[] s = Console.ReadLine().Split(' ');
            for (int i = 0; i < n; i++)
            {
                sold[i] = int.Parse(s[i]);
            }
            int[] height = new int[n];
            height[0] =Math.Abs( sold[0] - sold[n-1]);
            for (int i = 1; i < n; i++)
            {
                height[i] = Math.Abs(sold[i - 1] - sold[i]);
            }
            int cnt = 1001;
            int num=0;
            for (int i = 0; i < n; i++)
            {
                if (height[i] < cnt)
                {
                    cnt = height[i];
                    num = i;
                }
            }
            if (num == 0)
            {
                Console.WriteLine("1" + " " + n.ToString());
            }
            else
            {
                Console.WriteLine(Convert.ToString(num ) + " " + Convert.ToString(num+1));
            }
        }
    }
}


using System;

class Program
{
    static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        string[] s = Console.ReadLine().Split(' ');
        S[] w = new S[n];
        for (int i = 0; i < n; i++)
        {
            w[i].s = int.Parse(s[i]);
            w[i].i = i;
        }
        Array.Sort(w);
        int min = 1;
        for (int i = 1; i < n; i++)
        {
            if (w[i].s - w[i - 1].s < w[min].s - w[min - 1].s)
                min = i;
        }
        Console.WriteLine("{0} {1}", w[min].i + 1, w[min - 1].i + 1);
    }
}

struct S : IComparable<S>
{
    public int s, i;

    public int CompareTo(S st)
    {
        if (s < st.s)
            return -1;
        else if (s == st.s)
            return 0;
        else
            return 1;
    }
}


using System;

class Program
{
    static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        string[] s = Console.ReadLine().Split(' ');
        int[] w = new int[n];
        for (int i = 0; i < n; i++)
        {
            w[i] = int.Parse(s[i]);
        }
        int min = 1;
        for (int i = 0; i < n; i++)
        {
            if (Math.Abs(w[i] - w[(i + 1) % n]) < Math.Abs(w[(min) % n] - w[(min + 1) % n]))
                min = i;
        }
        Console.WriteLine("{0} {1}", (min) % n + 1, (min + 1) % n + 1);
    }
}


using System;

namespace Reconnaissance_2
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine());
            string[] line = Console.ReadLine().Split(' ');
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = Convert.ToInt32(line[i]);
            }
            int[] circleA = new int[n + 1];
            for (int i = 0; i < n; i++)
            {
                circleA[i] = a[i];
            }
            circleA[n] = a[0];
            int heightDiff = Math.Abs(circleA[0] - circleA[1]);
            int firstI = 0;
            int secondI = 1;
            for (int i = 1; i < n; i++)
            {
                if (Math.Abs(circleA[i] - circleA[i + 1]) < heightDiff)
                {
                    firstI = i;
                    secondI = i+1;
                    if (secondI == n)
                    {
                        firstI = 0;
                        secondI = n - 1;
                    }
                }
            }

            Console.Write((firstI+1) + " " + (secondI+1));

            /*for (int i = 0; i < circleA.Length; i++)
            {
                Console.WriteLine(circleA[i]);
            }
            */
        }
    }
}


using System;

namespace Reconnaissance_2
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine());
            string[] line = Console.ReadLine().Split(' ');
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = Convert.ToInt32(line[i]);
            }
            int[] circleA = new int[n + 1];
            for (int i = 0; i < n; i++)
            {
                circleA[i] = a[i];
            }
            circleA[n] = a[0];
            int heightDiff = Math.Abs(circleA[0] - circleA[1]);
            int firstI = 0;
            int secondI = 1;
            for (int i = 1; i < n; i++)
            {
                if (Math.Abs(circleA[i] - circleA[i + 1]) < heightDiff)
                {
                    firstI = i;
                    secondI = i + 1;
                }
            }
            if(secondI == n)
            {
                firstI = 0;
                secondI = n - 1;
            }
            Console.Write(firstI + " " + secondI);

            /*for (int i = 0; i < circleA.Length; i++)
            {
                Console.WriteLine(circleA[i]);
            }
            */
        }
    }
}


using System;

namespace Reconnaissance_2
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine());
            string[] line = Console.ReadLine().Split(' ');
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = Convert.ToInt32(line[i]);
            }
            int[] circleA = new int[n + 1];
            for (int i = 0; i < n; i++)
            {
                circleA[i] = a[i];
            }
            circleA[n] = a[0];
            int heightDiff = Math.Abs(circleA[0] - circleA[1]);
            int firstI = 0;
            int secondI = 1;
            for (int i = 1; i < n; i++)
            {
                if (Math.Abs(circleA[i] - circleA[i + 1]) < heightDiff)
                {
                    heightDiff = Math.Abs(circleA[i] - circleA[i + 1]);
                    firstI = i;
                    secondI = i+1;
                    if (secondI == n)
                    {
                        firstI = 0;
                        secondI = n - 1;
                    }
                }
            }

            Console.Write((firstI+1) + " " + (secondI+1));

            /*for (int i = 0; i < circleA.Length; i++)
            {
                Console.WriteLine(circleA[i]);
            }
            */
        }
    }
}


using System;

namespace A.Reconnaissance_2
{
    class Program
    {
        static void Main(string[] args)
        {
            int cases = int.Parse(Console.ReadLine());
            string[] sol = Console.ReadLine().Split(' ');
            int[] soldiers = new int[cases + 1];
            for (int i = 0; i < sol.Length; i++)
            {
                soldiers[i] = int.Parse(sol[i]);
            }
            soldiers[soldiers.Length - 1] = int.Parse(sol[0]);
            int min = 10000000;
            string result = "";
            for (int i = 0; i < soldiers.Length - 1; i++)
            {
                int dif = Math.Abs(soldiers[i] - soldiers[i + 1]);
                if (dif < min)
                {
                    min = dif;
                    if(i == sol.Length - 1)
                        result = (i + 1).ToString() + " 1";
                    else
                        result = (i + 1).ToString() + " " + (i + 2).ToString();
                }
            }
            Console.WriteLine(result);
            Console.ReadLine();
        }
    }
}


using System;
using System.Collections.Generic;
class some
{
	public static void Main()
	{
		int n=Int32.Parse(Console.ReadLine());
		int []arr=new int[n+1];
		string[] p=Console.ReadLine().Split();
		for(int i=0;i<n;i++)
		{
			arr[i]=Int32.Parse(p[i]);
		}
		arr[n]=arr[0];int max=200000;int ret=0;
		for(int i=0;i<n;i++)
		{
			if(Math.Abs(arr[i]-arr[i+1])<max)
			{
				max=Math.Abs(arr[i]-arr[i+1]);
				ret=i;
			}
		}
		Console.Write((1+ret)+" ");
		if(ret+1==n)
		Console.WriteLine(1);
		else
		Console.WriteLine(ret+2);
	}
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProblemA
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.ReadLine();
            var soldires = Console.ReadLine().Split(' ').Select(r => Int32.Parse(r)).ToArray();
            var min = Int32.MaxValue;
            var minIndx = -1;
            for (var i = 0; i < soldires.Count() - 1; i++)
            {
                var dif = Math.Abs(soldires[i] - soldires[i + 1]);
                if (dif >= min) continue;
                min = dif;
                minIndx = i;
            }
            var lastDif = Math.Abs(soldires[0] - soldires[soldires.Length - 1]);
            if (lastDif<min)
            {
                Console.WriteLine("{0} {1}", soldires.Length, 1);
            }
            else
            {
                Console.WriteLine("{0} {1}", minIndx + 1, minIndx + 2);
            }
        }
    }
}


using System;
namespace codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string[] arr = Console.ReadLine().Split(' ');
            int min1 = 1, min2 = 2, min = Math.Abs(int.Parse(arr[0]) - int.Parse(arr[1]));
            for (int i = 1; i < n - 1; i++) if (Math.Abs(int.Parse(arr[i]) - int.Parse(arr[i + 1])) < min)
                {
                    min = Math.Abs(int.Parse(arr[i]) - int.Parse(arr[i + 1])); min1 = i+1; min2 = i + 2;
                }
            if (Math.Abs(int.Parse(arr[0]) - int.Parse(arr[n - 1])) < min) { min = Math.Abs(int.Parse(arr[0]) - int.Parse(arr[n-1])); min1 = 1; min2 = n; }
            Console.WriteLine(min1 + " " + min2);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;

namespace _34_A_Reconnaissance
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int dif = 0;
            int mindif = 999999;
            int p = 0;
            int p1 = 0;

            string[] s = Console.ReadLine().Split(' ');
            int size = s.Length + 1;
            int[] arr = new int[size];

            for (int i = 0; i < arr.Length; i++)
            {
                if (i < size-1)
                {
                    arr[i] = int.Parse(s[i]);
                }
                else if(i == size - 1)
                {
                    arr[i] = int.Parse(s[0]);
                }
            }
            for (int i = 0; i < arr.Length-1; i++)
            {
                dif =  Math.Abs(arr[i] - arr[i + 1]);
                if (dif < mindif)
                {
                    mindif = dif;
                    p = i+1;
                    p1 = p + 1;
                    if (p1 == arr.Length)
                    {
                        p1 = 1;
                    }

                }
            }

            Console.WriteLine(p + " "+p1);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CF_034A {
    class Program {
        static void Main(string[] args) {
            int n=int.Parse(Console.ReadLine());
            string[] s=Console.ReadLine().Split(' ');
            int[] a=new int[s.Length+1];int r=1;
            for(int i=0;i<s.Length;i++) a[i+1]=int.Parse(s[i]); a[0]=a[n];
            for(int i=2;i<=n;i++)
                if(Math.Abs(a[i]-a[i-1])<Math.Abs(a[r]-a[r-1]))
                    r=i;
            Console.WriteLine(((r-2+n)%n+1).ToString()+" "+r.ToString());
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _34
{
    class Program
    {
        #region Shortcuts
        static string RL() { return Console.ReadLine(); }
        static string[] RSA() { return RL().Split(' '); }
        static int[] RIA() { return Array.ConvertAll<string, int>(RSA(), int.Parse); }
        static int RInt() { return int.Parse(RL()); }
        static long RLong() { return long.Parse(RL()); }
        static double RDouble() { return double.Parse(RL()); }
        static void RInts2(out int p1, out int p2) { int[] a = RIA(); p1 = a[0]; p2 = a[1]; }
        static void RInts3(out int p1, out int p2, out int p3) { int[] a = RIA(); p1 = a[0]; p2 = a[1]; p3 = a[2]; }

        static void Swap<T>(ref T a, ref T b) { T tmp = a; a = b; b = tmp; }
        static void Fill<T>(T[] d, T v) { for (int i = 0; i < d.Length; i++) d[i] = v; }
        static void Fill<T>(T[,] d, T v) { for (int i = 0; i < d.GetLength(0); i++) { for (int j = 0; j < d.GetLength(1); j++) { d[i, j] = v; } } }
        #endregion

        static void Main(string[] args)
        {
            int c = RInt();//兵士の量
            int[] soldierHeights = RIA();
            int heightDifference = int.MaxValue;
            int index1 = int.MinValue, index2 = int.MinValue;

            for (int i = 0; i < c; i++)
            {
                int subindex = i + 1 >= soldierHeights.Length ? 0 : i + 1;
                int hd = Math.Abs(soldierHeights[i] - soldierHeights[subindex]);
                if (heightDifference > hd)
                {
                    heightDifference = hd;
                    index1 = i;
                    index2 = subindex;
                }
            }
            Console.Write("{0} {1}", index1+1, index2+1);

        }

        static string Prosess(string ags)
        {
            return null;
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace capp
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] a = GetArray();
            int min = 1000;
            int nmin1 = -1;
            for (int i = 0; i < n-1 ;i++)
                if (Math.Abs(a[i] - a[i + 1]) < min)
                {
                    min = Math.Abs(a[i] - a[i + 1]);
                    nmin1 = i+1;
                }
            if (Math.Abs(a[n - 1] - a[0]) < min)
            {
                Console.WriteLine(n + " " + 1);
            }
            else
                Console.WriteLine(nmin1 + " " + (nmin1+1));

        }

        static bool IsSimple(int b)
        {
            int c = (int)Math.Round(Math.Sqrt(b));
            for (int i = 2; i <= c; i++)
                if (b % i == 0)
                    return false;
            return true;
        }

        static int[] GetArray()
        {
            return Array.ConvertAll(Console.ReadLine().Split(' '), x => int.Parse(x));
        }
    }

    public class Elem
    {
        public int Val1 { get; set; }
        public int Val2 { get; set; }
        public int Number { get; set; }
        public Elem(int val1, int val2)
        {
            Val1 = val1;
            Val2 = val2;
        }
        public Elem(string s, int n)
        {
            int[] data = Array.ConvertAll(s.Split(' '), z => int.Parse(z));
            Val1 = data[0];
            Val2 = data[1];
            Number = n;
        }
        public Elem(string s) : this(s, -1) { }
    }

}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace codeforces34A
{
    class Program
    {
        static void Main(string[] args)
        {
            int ans1,ans2,min;
            int n = int.Parse(Console.ReadLine());
            int [] data = new int [n];
            string [] tmp = Console.ReadLine().Split(' ');
            for (int i = 0; i < n; i++)
                data[i] = int.Parse(tmp[i]);
            ans1 = 0; ans2 = n - 1; min = Math.Abs(data[0] - data[n - 1]);
            for (int i = 1;i < n;i++)
                if (Math.Abs(data[i] - data[i - 1]) < min)
                {
                    min = Math.Abs(data[i] - data[i - 1]);
                    ans1 = i;
                    ans2 = i - 1;
                }

            Console.WriteLine("{0} {1}", ans1 + 1, ans2 + 1);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace acm
{
    class Program
    {
        class Ind
        {
            public int A { get; set; }
            public int B { get; set; }

            public Ind(int a, int b)
            {
                A = a;
                B = b;
            }
        }

        static void Main(string[] args)
        {
            Console.ReadLine();
            string[] s = Console.ReadLine().Split(' ');

            Dictionary<Ind, int> r = new Dictionary<Ind, int>();
            int a = 0;
            int b = 0;

            for (int i = 1; i < s.Count(); i++)
            {
                a = int.Parse(s[i - 1]);
                b = int.Parse(s[i]);
                r.Add(new Ind(i - 1, i), Math.Abs(a - b));
            }
            a = int.Parse(s[s.Count() - 1]);
            b = int.Parse(s[0]);
            r.Add(new Ind(s.Count() - 1, 0), Math.Abs(a - b));

            var pair = r.First(p => p.Value == r.Values.Min());
            Console.WriteLine((pair.Key.A + 1) + " " + (pair.Key.B + 1));

        }
    }
}


using System;
using System.Linq;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main()
        {
            var b = Convert.ToByte(Console.ReadLine());
            var str = Console.ReadLine().Split(' ');
            var list = str.Select(s => Convert.ToInt16(s)).ToList();

            var lst = new[]{1,2};
            var min = (short) Math.Abs(list[0] - list[1]);
            for (var i = 2; i < b ; i++)
            {
                var mini = (short) Math.Abs(list[i-1] - list[i]);
                if (mini<min)
                {
                    min = mini;
                    lst = new[] { i, i+1 };
                }
            }
            if (((short)Math.Abs(list[0] - list[b - 1])) < min)
            {
                lst = new[] { b, 1 };
            }
            Console.Write(lst[0] + " " + lst[1]);
        }
    }
}


using System;
using System.Linq;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main()
        {
            var b = Convert.ToByte(Console.ReadLine());
            var str = Console.ReadLine().Split(' ');
            var list = str.Select(s => Convert.ToInt16(s)).ToList();

            var lst = new[]{1,2};
            var min = (short) Math.Abs(list[0] - list[1]);
            for (var i = 2; i < b - 1; i++)
            {
                var mini = (short) Math.Abs(list[i] - list[i + 1]);
                if (mini<min)
                {
                    min = mini;
                    lst = new[] { i, i+1 };
                }
            }
            if (((short)Math.Abs(list[0] - list[b - 1])) < min)
            {
                lst = new[] { b, 1 };
            }
            Console.Write(lst[0] + " " + lst[1]);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Text;

namespace CodeForces
{
    public class Reconnaissance_2
    {
        public static void Main(string[] args)
        {
            string line = Console.ReadLine();
            while ((line != null) && (!string.IsNullOrEmpty(line)))
            {
                int nbSoldiers = int.Parse(line);
                line = Console.ReadLine();
                string[] parts = line.Split(new char[] { ' ' });

                int[] weights = Array.ConvertAll<string, int>(parts, new Converter<string,int>(ConvertToInt));

                int minWeight = int.MaxValue;
                int x = 0,y = 0;
                for (int i = 0; i < nbSoldiers; i++)
                {
                    if (i < nbSoldiers - 1)
                    {
                        int d = Math.Abs(weights[i] - weights[i + 1]);
                        if (d < minWeight)
                        {
                            minWeight = d;
                            x = i + 1; y = x + 1;
                        }
                    }
                    else
                    {
                        int d = Math.Abs(weights[i] - weights[0]);
                        if (d < minWeight)
                        {
                            minWeight = d;
                            x = i + 1; y = 1;
                        }
                    }
                }
                Console.WriteLine("{0} {1}", x, y);
                line = Console.ReadLine();
            }
        }

        static int ConvertToInt(string s)
        {
            return int.Parse(s);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
namespace Task34A
{
    class Program
    {
        static void Main(string[] args)
        {
            int firstIndex = 1, SecondIndex = 2;
            int n = Convert.ToInt32(Console.ReadLine());
            int[] soldiers = Console.ReadLine().Split().Select(int.Parse).ToArray();
            string ans = Convert.ToString(1) + " " + Convert.ToString(n);
            int mindif = Math.Abs(soldiers[0] - soldiers[n - 1]);
            for (int i = 0; i < n - 1; i++)
            {
                int temp = Math.Abs(soldiers[i] - soldiers[i + 1]);
                if (mindif > temp)
                {
                    mindif = temp;
                    ans = Convert.ToString(i + 1) + " " + Convert.ToString(i + 2);
                }
                Console.WriteLine(ans);

            }

        }
    }

}


using System;
using System.Collections.Generic;
using System.Linq;
namespace Task34A
{
    class Program
    {
        static void Main(string[] args)
        {
            int firstIndex = 1, SecondIndex = 2;
            int n = Convert.ToInt32(Console.ReadLine());
            int[] soldiers = Console.ReadLine().Split().Select(int.Parse).ToArray();
            string ans = Convert.ToString(1) + " " + Convert.ToString(n);
            int mindif = Math.Abs(soldiers[0] - soldiers[n - 1]);
            for (int i = 0; i < n - 1; i++)
            {
                int temp = Math.Abs(soldiers[i] - soldiers[i + 1]);
                if (mindif > temp)
                {

                    mindif = temp;
                    ans = Convert.ToString(i + 1) + " " + Convert.ToString(i + 2);
                }

            }
                    Console.WriteLine(ans);

        }
    }

}


using System;
using System.Collections.Generic;
using System.Linq;
namespace Task34A
{
    class Program
    {
        static void Main(string[] args)
        {
            int firstIndex = 1, SecondIndex = 2;
            int n = Convert.ToInt32(Console.ReadLine());
            int[] soldiers = Console.ReadLine().Split().Select(int.Parse).ToArray();
            string ans = Convert.ToString(1) + " " + Convert.ToString(n);
            int mindif = Math.Abs(soldiers[0] - soldiers[n - 1]);
            for (int i = 0; i < n - 1; i++)
            {
                int temp = Math.Abs(soldiers[i] - soldiers[i + 1]);
                if (mindif > temp)
                {
                    mindif = temp;
                    ans = Convert.ToString(i + 1) + " " + Convert.ToString(i + 2);
                }

            }
                    Console.WriteLine(ans);

        }
    }

}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Codeforces
{
#if _ONLINE_JUDGE_
	[OnlineJudge.Task("Codeforces 34A")]
#endif
	class Task34A
	{
		private InputTokenizer cin = new InputTokenizer();
		private TextWriter cout = Console.Out;

		private void Solve()
		{
			int n;
			int[] a;
			cin.Line().Read(out n)
			   .Line().Read(n, out a);

			int best = 10000000, _i = 0, _j = 0;
			for (int i = 0; i < n; ++i)
				for (int j = 0; j < i; ++j)
					if (Math.Abs(a[i] - a[j]) < best)
					{
						best = Math.Abs(a[i] - a[j]);
						_i = i;
						_j = j;
					}

			cout.WriteLine("{0} {1}", _i + 1, _j + 1);
		}

		public static void Main()
		{
			var obj = new Task34A();
			obj.Solve();
		}

		#region
		private class InputTokenizer
		{
			private List<string> _tokens = new List<string>();
			private int _offset = 0;

			public InputTokenizer()
			{
			}

			public InputTokenizer String(String s)
			{
				_tokens.AddRange(s.Split(new char[] { ' ', '\n', '\t', '\r' }, StringSplitOptions.RemoveEmptyEntries));
				return this;
			}

			public InputTokenizer Line()
			{
				return String(Console.In.ReadLine());
			}

			public InputTokenizer Read(out int v)
			{
				v = int.Parse(_tokens[_offset++]);
				return this;
			}

			public InputTokenizer Read(int n, out int[] v)
			{
				v = new int[n];
				for (int i = 0; i < n; ++i) Read(out v[i]);
				return this;
			}

			public InputTokenizer Read(out long v)
			{
				v = long.Parse(_tokens[_offset++]);
				return this;
			}

			public InputTokenizer Read(int n, out long[] v)
			{
				v = new long[n];
				for (int i = 0; i < n; ++i) Read(out v[i]);
				return this;
			}

			public InputTokenizer Read(out ulong v)
			{
				v = ulong.Parse(_tokens[_offset++]);
				return this;
			}

			public InputTokenizer Read(int n, out ulong[] v)
			{
				v = new ulong[n];
				for (int i = 0; i < n; ++i) Read(out v[i]);
				return this;
			}

			public InputTokenizer Read(out double v)
			{
				v = double.Parse(_tokens[_offset++].Replace('.', ','));
				return this;
			}

			public InputTokenizer Read(int n, out double[] v)
			{
				v = new double[n];
				for (int i = 0; i < n; ++i) Read(out v[i]);
				return this;
			}

			public InputTokenizer Read(out string v)
			{
				v = _tokens[_offset++];
				return this;
			}

			public InputTokenizer Read(int n, out string[] v)
			{
				v = new string[n];
				for (int i = 0; i < n; ++i) Read(out v[i]);
				return this;
			}
		}
		#endregion
	}
}


#include <iostream>
#include <math.h>
#include <string.h>
using namespace std;

void main() {
	int a, b, c;
	cin >> a >> b >> c;
	double d = b*b - 4*a*c;
	double x1, x2;
	x1 = (sqrt(d) - b) / (2 * a);
	x2 = (-sqrt(d) - b) / (2 * a);
	if (x1 > x2) cout << x1 << endl << x2 << endl;
	else cout << x2 << endl << x1 << endl;
}

//#include <stdio.h>
//#include <algorithm>
//#include <string.h>
//#include <queue>
//#include <stack>
//#include <map>
//#include <vector>
//using namespace std;
//
//const int maxn = 100000 + 50;
//char s[maxn];
//char t[35];
//struct Seg
//{
//	int l, r;
//	Seg(int a, int b){ l = a; r = b; }
//};
//vector<Seg>v;
//int L, R;
//
//bool CMP(int pos)
//{
//	bool flag = 1;
//
//	for (int i = 0; t[i]; i++)
//	{
//		if (t[i] != s[i + pos]) { flag = 0; break; }
//	}
//	return flag;
//}
//
//int main()
//{
//	scanf("%s", s);
//	scanf("%s", t);
//	v.clear();
//
//	int lens = strlen(s);
//	int lent = strlen(t);
//
//	for (int i = 0; i<lens; i++)
//	{
//		if (CMP(i))
//		{
//			Seg seg(i, i + lent - 1);
//			v.push_back(seg);
//		}
//	}
//	int ans;
//	if (v.size() == 0) ans = 0;
//	else
//	{
//		ans = 1;
//		L = v[0].l, R = v[0].r;
//		for (int i = 1; i<v.size(); i++)
//		{
//			if (v[i].l <= R) L = v[i].l;
//			else
//			{
//				ans++;
//				L = v[i].l;
//				R = v[i].r;
//			}
//		}
//	}
//	printf("%d\n", ans);
//	return 0;
//}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <queue>
using namespace std;

#define ll long long int

int main() {
	int a, b, c;
	cin >> a >> b >> c;
	double d = b*b - 4 * a*c;
	double x1, x2;
	x1 = (sqrt(d) - b) / (2 * a);
	x2 = (-sqrt(d) - b) / (2 * a);
	if (x1 > x2) printf("%.15f\n%.15f\n", x1, x2);
	else printf("%.15f\n%.15f\n", x2, x1);
	return 0;
}


#include <iostream>
#include <math.h>
#include <string.h>
using namespace std;

void main() {
	int a, b, c;
	cin >> a >> b >> c;
	double d = b*b - 4*a*c;
	double x1, x2;
	x1 = (sqrt(d) - b) / (2 * a);
	x2 = (-sqrt(d) - b) / (2 * a);
	cout << x1 << endl << x2 << endl;
}

//#include <stdio.h>
//#include <algorithm>
//#include <string.h>
//#include <queue>
//#include <stack>
//#include <map>
//#include <vector>
//using namespace std;
//
//const int maxn = 100000 + 50;
//char s[maxn];
//char t[35];
//struct Seg
//{
//	int l, r;
//	Seg(int a, int b){ l = a; r = b; }
//};
//vector<Seg>v;
//int L, R;
//
//bool CMP(int pos)
//{
//	bool flag = 1;
//
//	for (int i = 0; t[i]; i++)
//	{
//		if (t[i] != s[i + pos]) { flag = 0; break; }
//	}
//	return flag;
//}
//
//int main()
//{
//	scanf("%s", s);
//	scanf("%s", t);
//	v.clear();
//
//	int lens = strlen(s);
//	int lent = strlen(t);
//
//	for (int i = 0; i<lens; i++)
//	{
//		if (CMP(i))
//		{
//			Seg seg(i, i + lent - 1);
//			v.push_back(seg);
//		}
//	}
//	int ans;
//	if (v.size() == 0) ans = 0;
//	else
//	{
//		ans = 1;
//		L = v[0].l, R = v[0].r;
//		for (int i = 1; i<v.size(); i++)
//		{
//			if (v[i].l <= R) L = v[i].l;
//			else
//			{
//				ans++;
//				L = v[i].l;
//				R = v[i].r;
//			}
//		}
//	}
//	printf("%d\n", ans);
//	return 0;
//}


#include<iostream>
#include<vector>
#include<stdio.h>
#include<math.h>

using namespace std;
long double n,a,b,c,i,j,k,m,t,A,B,C;
double x,y;

int main(){
	cin>>a>>b>>c;
	A=(-b+sqrt(b*b-4*a*c))/(2*a);
	B=(-b-sqrt(b*b-4*a*c))/(2*a);
	printf("%.15f\n%.15f",max(A,B),min(A,B));
}


#include<iostream>
#include<vector>
#include<stdio.h>
#include<math.h>

using namespace std;
long double n,a,b,c,i,j,k,m,t,A,B,C;
double x,y;

int main(){
	cin>>a>>b>>c;
	A=(-b+sqrt(b*b-4*a*c))/(2*a);
	B=(-b-sqrt(b*b-4*a*c))/(2*a);
	printf("%.15f\n%.15f",A,B);
}


#include <iostream>
#include <algorithm>
#include <string>
#include <list>
#include <math.h>
#include <vector>
#include <set>
#include <stdlib.h>
#include <string.h>
#include <ctime>
#include <random>
#include <stack>
#include <map>
#include <queue>

#define ll long long int

using namespace std;

ll INF = 1e18, n, m, k, p[100100], sum, a[500100], b[500100], c[300100], d[100100], f[10], s, x, y, z, mx = -INF, mn = INF, ans, ind;
bool marked[1010][1010], marked1[1010][1010];
double M_PI = 3.1415926535897932384626433832795;

struct time1
{
	ll x, y, pos;
}arr[200100];

bool cmp(time1 x, time1 y)
{
	return x.x < y.x;
}

vector<ll> v(100100, INF),v1(100100, 0), v2(100100, 0);

int main()
{
	//freopen("text.in", "r",stdin);
	//freopen("text.out", "w",stdout);
	ll a1,b1,c1;
	cin >> a1 >> b1 >> c1;
	printf("%0.7lf\n", max((-b1+sqrt((b1*b1-4*a1*c1)*1.0))/(2*a1),(-b1-sqrt((b1*b1-4*a1*c1)*1.0))/(2*a1)));
	printf("%0.7lf\n", min((-b1+sqrt((b1*b1-4*a1*c1)*1.0))/(2*a1),(-b1-sqrt((b1*b1-4*a1*c1)*1.0))/(2*a1)));
   	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>
#include <list>
#include <math.h>
#include <vector>
#include <set>
#include <stdlib.h>
#include <string.h>
#include <ctime>
#include <random>
#include <stack>
#include <map>
#include <queue>

#define ll long long int

using namespace std;

ll INF = 1e18, n, m, k, p[100100], sum, a[500100], b[500100], c[300100], d[100100], f[10], s, x, y, z, mx = -INF, mn = INF, ans, ind;
bool marked[1010][1010], marked1[1010][1010];
double M_PI = 3.1415926535897932384626433832795;

struct time1
{
	ll x, y, pos;
}arr[200100];

bool cmp(time1 x, time1 y)
{
	return x.x < y.x;
}

vector<ll> v(100100, INF),v1(100100, 0), v2(100100, 0);

int main()
{
	//freopen("text.in", "r",stdin);
	//freopen("text.out", "w",stdout);
	ll a1,b1,c1;
	cin >> a1 >> b1 >> c1;
	printf("%0.7lf\n", (-b1-sqrt((b1*b1-4*a1*c1)*1.0))/(2*a1));
	printf("%0.7lf", (-b1+sqrt((b1*b1-4*a1*c1)*1.0))/(2*a1));
   	return 0;
}


#include <iostream>
#include <iomanip>
#include <cmath>
#include <set>
#include <string>
#include <map>
#include <utility>
#include <queue>
#include <algorithm>
#include <stack>
using namespace std;

int main()
{
	//freopen("in.txt","r",stdin);
	//freopen("out.txt","w",stdout);
	double a,b,c;
	cin>>a>>b>>c;
	if (a>0)
	printf("%.8lf\n%.8lf", (-b+sqrt(b*b-4*a*c))/(2*a),(-b-sqrt(b*b-4*a*c))/(2*a) );
	else
		printf("%.8lf\n%.8lf", (-b-sqrt(b*b-4*a*c))/(2*a),(-b+sqrt(b*b-4*a*c))/(2*a) );
	return 0;
}


#include <iostream>
#include <iomanip>
#include <cmath>
#include <set>
#include <string>
#include <map>
#include <utility>
#include <queue>
#include <algorithm>
#include <stack>
using namespace std;

int main()
{
	//freopen("in.txt","r",stdin);
	//freopen("out.txt","w",stdout);
	double a,b,c;
	cin>>a>>b>>c;
	printf("%.6lf\n%.6lf", (-b+sqrt(b*b-4*a*c))/(2*a),(-b-sqrt(b*b-4*a*c))/(2*a) );
	return 0;
}


#include <iostream>
#include <iomanip>
#include <cmath>
#include <set>
#include <string>
#include <map>
#include <utility>
#include <queue>
#include <algorithm>
#include <stack>
using namespace std;

int main()
{
	//freopen("in.txt","r",stdin);
	//freopen("out.txt","w",stdout);
	double a,b,c;
	cin>>a>>b>>c;
	printf("%.8lf\n%.8lf", (-b+sqrt(b*b-4*a*c))/(2*a),(-b-sqrt(b*b-4*a*c))/(2*a) );
	return 0;
}


#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>

using namespace std;
int main()
{
	long long int a, b, c;
	cin >> a >> b >> c;
	double r1 , r2 ,ad;
	ad = sqrt(b*b - 4 * a*c);
	r1 = (-b + ad) / 2 * a;
	r2 = (-b - ad) / 2 * a;
	r1 > r2 ? cout << r1 << endl << r2 << endl : cout << r2 << endl << r1 << endl;

	return 0;
}


#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
#include <cmath>

using namespace std;
int main()
{
	 long double a, b, c;
	cin >> a >> b >> c;
	double r1 , r2 ,ad;
	ad = sqrt(b*b - 4 * a*c);
	r1 = double ((-b + ad) / 2 * a);
	r2 = double ((-b - ad) / 2 * a);

	if (r1 > r2)
	{
		cout.precision(17);
		cout << fixed << r1 << endl;
		cout << fixed << r2 << endl;

	}
	else
	{
	cout.precision(17);
		cout << fixed << r2 << endl;
		cout << fixed << r1 << endl;

	}
	return 0;
}


#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
#include <cmath>

using namespace std;
int main()
{
	 long double a, b, c;
	cin >> a >> b >> c;
	double r1 , r2 ,ad;
	ad = sqrt(b*b - 4 * a*c);
	r1 = double ((-b + ad) / (2 * a));
	r2 = double ((-b - ad) / (2 * a));

	if (r1 > r2)
	{
		cout.precision(17);
		cout << fixed << r1 << endl;
		cout << fixed << r2 << endl;

	}
	else
	{
	cout.precision(17);
		cout << fixed << r2 << endl;
		cout << fixed << r1 << endl;

	}
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <math.h>
using namespace std;

int main()
{
	int a, b, c;
	scanf("%d %d %d",&a,&b,&c);
	double d = b*b - 4 * a*c;
	d = sqrt(d);
	double d1 = (-b + d) / 2 / a ;
	double d2 = (-b - d) / 2 / a ;

	if (d1 >d2)
	{
	printf("%.15f\n",  (-b + d) / 2 / a );
	printf("%.15f\n", (-b - d) / 2 / a );
	}
	else
	{
		printf("%.15f\n", (-b - d) / 2 / a );
		printf("%.15f\n",  (-b + d) / 2 / a );

	}
	//cout << fixed << setprecision(15) << (-b + d) / 2 / a  << endl << (-b - d) / 2 / a;

}


#include <stdio.h>
#include <iostream>
#include <math.h>
using namespace std;

int main(int argc, char* argv[])
{
	int a, b, c;
	cin >> a >> b >> c;
	double d = sqrt(b*b - 4 * a*c);

	printf("%.15f\n",  a);
	printf("%.15f\n", b);
	printf("%.15f\n", c);
	//cout << fixed << setprecision(15) << (-b + d) / 2 / a  << endl << (-b - d) / 2 / a;

}


#include <stdio.h>
#include <iostream>
#include <math.h>
using namespace std;

int main()
{
	int a, b, c;
	scanf("%d %d %d",&a,&b,&c);
	double d = b*b - 4 * a*c;
	d = sqrt(d);
	double d1 = (-b + d) / 2 / a );
	double d2 = (-b - d) / 2 / a );

	if (d1 >d2)
	{
	printf("%.15f\n",  (-b + d) / 2 / a );
	printf("%.15f\n", (-b - d) / 2 / a );
	}
	else
	{printf("%.15f\n", (-b - d) / 2 / a );
		printf("%.15f\n",  (-b + d) / 2 / a );

	}
	//cout << fixed << setprecision(15) << (-b + d) / 2 / a  << endl << (-b - d) / 2 / a;

}


#include <stdio.h>
#include <iostream>
#include <math.h>
using namespace std;

int main()
{
	int a, b, c;
	scanf("%d %d %d",&a,&b,&c);
	double d = b*b - 4 * a*c;
	d = sqrt(d);

	printf("%.15f\n",  (-b + d) / 2 / a );
	printf("%.15f\n", (-b - d) / 2 / a );
	//cout << fixed << setprecision(15) << (-b + d) / 2 / a  << endl << (-b - d) / 2 / a;

}


#include <fstream>
#include <iostream>
using namespace std;

int main(int argc, char* argv[])
{
	int a, b, c;
	ifstream fin("Text.txt");

	fin >> a >> b >> c;
	double d = sqrt(b*b - 4 * a*c);

	cout << (-b + d) / 2 / a  << endl << (-b - d) / 2 / a;

}


#include <iostream>
#include <cmath>
#include <cstdio>
#include <iomanip>
using namespace std;
long double a, b, c, D;
int main(){
	cin >> a >> b >> c;
	if(a < 0)
		a *= -1, b *= -1, c *= -1;
	cout.setf(ios::fixed);
	cout.precision(6);
	D = sqrtl(b*b-4*a*c);
	cout << (-b+D)/(2*a) << endl;
	cout << (-b-D)/(2*a) << endl;
	return 0;
}


#include <iostream>
#include <cmath>
#include <cstdio>
#include <iomanip>
using namespace std;
long double a, b, c, D;
int main(){
	cin >> a >> b >> c;
	cout.setf(ios::fixed);
	cout.precision(6);
	D = sqrtl(b*b-4*a*c);
	cout << (-b+D)/(2*a) << endl;
	cout << (-b-D)/(2*a) << endl;
	return 0;
}


#define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<cstdio>
#include<string>
#include<algorithm>
using namespace std;
typedef long long ll;
typedef long double dd;
int main()
{
    dd a, b, c;
    cin >> a >> b >> c;
    printf("%.10Lf",(-b + sqrt(b * b - 4 * a * c)) / (2 * a));
    cout << endl;
    printf("%.10Lf",(-b - sqrt(b * b - 4 * a * c)) / (2 * a));
    return 0;
}


#define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<cstdio>
#include<string>
#include<algorithm>
using namespace std;
typedef long long ll;
typedef long double dd;
int main()
{
    dd a, b, c;
    cin >> a >> b >> c;
    printf("%.10Lf",(-b + sqrt(b * b - 4 * a * c)) / (2 * a));
    printf("%.10Lf",(-b - sqrt(b * b - 4 * a * c)) / (2 * a));
    return 0;
}


#define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<cstdio>
#include<string>
#include<algorithm>
using namespace std;
typedef long long ll;
typedef long double dd;
int main()
{
    dd a, b, c;
    cin >> a >> b >> c;
    dd x1 = (-b + sqrt(b * b - 4 * a * c)) / (2 * a);
    dd x2 = (-b - sqrt(b * b - 4 * a * c)) / (2 * a);
    printf("%.10Lf",max(x1, x2));
    cout << endl;
    printf("%.10Lf",min(x1, x2));
    return 0;
}


#include <iostream>
#include <iomanip>
#include <math.h>
using namespace std;
int main()
{
   long long int a,c;
  long double b;
   cin>>a>>b>>c;
  long double D;
   D=pow(b,2)-4*a*c;
  long double x1,x2;
   x1=((-1)*b+sqrt(D))/(2*a);
   x2=((-1)*b-sqrt(D))/(2*a)
   if(x1>x2)
   cout <<fixed <<setprecision(8)<<x1<<endl<<x2;
   else
    cout <<fixed <<setprecision(8)<<x2<<endl<<x1;
}


#include <iostream>
#include <iomanip>
#include <math.h>
using namespace std;
int main()
{
   long long int a,c;
  long double b;
   cin>>a>>b>>c;
  long double D;
   D=pow(b,2)-4*a*c;
  long double x1,x2;
   x1=((-1)*b+sqrt(D))/(2*a);
   x2=((-1)*b-sqrt(D))/(2*a);
   if(x1>x2)
   cout <<fixed <<setprecision(8)<<x1<<endl<<x2;
   else
    cout <<fixed <<setprecision(8)<<x2<<endl<<x1;
}


#include <iostream>
#include <iomanip>
#include <math.h>
using namespace std;
int main()
{
   long long int a,c;
  long double b;
   cin>>a>>b>>c;
  long double D;
   D=pow(b,2)-4*a*c;
  long double x1,x2;
   x1=((-1)*b+sqrt(D))/(2*a);
   x2=((-1)*b-sqrt(D))/(2*a);
   cout <<fixed <<setprecision(8)<<x1<<endl<<x2;

}


#include<iostream>
using namespace std;

int main()
{

#pragma warning(disable : 4996)

#ifdef _DEBUG

freopen("input.txt", "r", stdin);

freopen("output.txt", "w", stdout);

#endif

int a, b, c;
long double o, p;

cin >> a >>b  >>c;

/*double(a) =  int(a);
double(b) =  int(b);
double(c) =  int(c);*/
o = (((sqrt((double)b*b-4*a*c)) - b)/(2*a));
p = (((-sqrt((double)b*b-4*a*c)) - b)/(2*a));
cout.precision(10);
cout <<max(o, p) << "\n" <<min(o,p);

return 0;

}


using namespace std;

int main()
{

#pragma warning(disable : 4996)

#ifdef _DEBUG

freopen("input.txt", "r", stdin);

freopen("output.txt", "w", stdout);

#endif

long long int a, b, c;
double o, p;

cin >> a, b, c;

double(a) = int(a);
double(b) = int(b);
double(c) = int(c);
o = (sqrt(b*b-4*a*c) - b)/(2*a);
p = (-sqrt(b*b-4*a*c) - b)/(2*a);
cout <<o;
cout <<p;

return 0;

}


using namespace std;

int main()
{

#pragma warning(disable : 4996)

#ifdef _DEBUG

freopen("input.txt", "r", stdin);

freopen("output.txt", "w", stdout);

#endif

long long int a, b, c;
double o, p;

cin >> a, b, c;

o = (sqrt(b*b-4*a*c) - b)/(2*a);
p = (-sqrt(b*b-4*a*c) - b)/(2*a);
cout <<o;
cout <<p;

return 0;

}


#include<iostream>
using namespace std;

int main()
{

#pragma warning(disable : 4996)

#ifdef _DEBUG

freopen("input.txt", "r", stdin);

freopen("output.txt", "w", stdout);

#endif

int a, b, c;
long double o, p;

cin >> a >>b  >>c;

/*double(a) =  int(a);
double(b) =  int(b);
double(c) =  int(c);*/
o = (((sqrt((double)b*b-4*a*c)) - b)/(2*a));
p = (((-sqrt((double)b*b-4*a*c)) - b)/(2*a));
cout.precision(10);
cout <<o << "\n" <<p;

return 0;

}


#include<iostream>
using namespace std;

int main()
{

#pragma warning(disable : 4996)

#ifdef _DEBUG

freopen("input.txt", "r", stdin);

freopen("output.txt", "w", stdout);

#endif

long long int a, b, c;
double o, p;

cin >> a, b, c;

double(a) = int(a);
double(b) = int(b);
double(c) = int(c);
o = (sqrt(b*b-4*a*c) - b)/(2*a);
p = (-sqrt(b*b-4*a*c) - b)/(2*a);
cout <<o;
cout <<p;

return 0;

}


#include<iostream>
using namespace std;

int main()
{

#pragma warning(disable : 4996)

#ifdef _DEBUG

freopen("input.txt", "r", stdin);

freopen("output.txt", "w", stdout);

#endif

int a, b, c;
long double o, p;

cin >> a >>b  >>c;

/*double(a) =  int(a);
double(b) =  int(b);
double(c) =  int(c);*/
o = (((sqrt((double)b*b-4*a*c)) - b)/(2*a));
p = (((-sqrt((double)b*b-4*a*c)) - b)/(2*a));
cout.precision(10);
cout <<o;
cout <<p;

return 0;

}


#include<cstdio>
#include<iostream>
#include<cmath>
using namespace std;

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	double a, b, c;
	cin >> a >> b >> c;
	double x1 = (-b + sqrt(b * b - 4.0 * a * c)) / 2.0 / a;
	double x2 = (-b - sqrt(b * b - 4.0 * a * c)) / 2.0 / a;
	if (x2 - x1 > 1e-8)
		swap(x1, x2);
	printf("%.6lf\n%.6lf", x1, x2);
	return 0;
}


#include<cstdio>
#include<iostream>
using namespace std;

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	double a, b, c;
	cin >> a >> b >> c;
	double x1 = (-b + sqrt(b * b - 4.0 * a * c)) / 2.0 / a;
	double x2 = (-b - sqrt(b * b - 4.0 * a * c)) / 2.0 / a;
	printf("%.6lf\n%.6lf", x1, x2);
	return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <map>

#define ll long long
#define ui unsigned long long

using namespace std;

int main()
{
	double a, b, c;
	cin >> a >> b >> c;
	cout << fixed << (-b + sqrt(b*b - 4 * a*c)) / (2 * a) << endl;
	cout << fixed << (-b - sqrt(b*b - 4 * a*c)) / (2 * a) << endl;
	return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <map>

#define ll long long
#define ui unsigned long long

using namespace std;

int main()
{
	double a, b, c;
	cin >> a >> b >> c;
	double x1 = (-b + sqrt(b*b - 4 * a*c)) / (2 * a);
	double x2 = (-b - sqrt(b*b - 4 * a*c)) / (2 * a);

	if (x1 > x2)
	{
		cout << fixed << x1 << endl;
		cout << fixed << x2 << endl;
	}
else
{
	cout << fixed << x2 << endl;
	cout << fixed << x1 << endl;
}
	return 0;
}


#include <iostream>
#include <math.h>
#include <algorithm>
using namespace std;
long long a,b,c;
double d,x1,x2;
int main()
{
	cin>>a>>b>>c;
	d=b*b-4*a*c;
	d=sqrt(d);
	x1=(-b+d)/(2*a);
	x2=(-b-d)/(2*a);
	printf("%.6f",x1);
	cout<<endl;
	printf("%.6f",x2);
}


#include <iostream>
#include <math.h>
#include <algorithm>
using namespace std;
long long a,b,c;
double d,x1,x2;
int main()
{
	cin>>a>>b>>c;
	d=b*b-4*a*c;
	d=sqrt(d);
	x1=(-b+d)/(2*a);
	x2=(-b-d)/(2*a);
	if (x1<x2)
		swap(x1,x2);
	printf("%.6f",x1);
	cout<<endl;
	printf("%.6f",x2);
}


#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main(){

	double a, b, c;
	a = b = c = 0.0;
	cin >> a >> b >> c;
	double res1, res2;
	res1 = res2 = 0.0;
	res1 = (b*(-1) + sqrt(b*b - 4 * a*c)) / (2 * a);
	res2 = (b*(-1) - sqrt(b*b - 4 * a*c)) / (2 * a);
	if (res1 > res2){
		cout << fixed << setprecision(10) << res1 << endl;
		cout << fixed << setprecision(10) << res2 << endl;
	}
	else {
		cout << fixed << setprecision(10) << res2 << endl;
		cout << fixed << setprecision(10) << res1 << endl;
	}

}


#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main(){

	int a, b, c;
	a = b = c = 0;
	cin >> a >> b >> c;
	double res1, res2;
	res1 = res2 = 0.0;
	res1 = (-b + sqrt(b*b - 4 * a*c)) / (2 * a);
	res2 = (-b - sqrt(b*b - 4 * a*c)) / (2 * a);
	if (res1 > res2){
		cout << fixed << setprecision(10) << res1 << endl;
		cout << fixed << setprecision(10) << res2 << endl;
	}
	else {
		cout << fixed << setprecision(10) << res2 << endl;
		cout << fixed << setprecision(10) << res1 << endl;
	}

}


#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main(){

	float a, b, c;
	a = b = c = 0.0;
	cin >> a >> b >> c;
	double res1, res2;
	res1 = res2 = 0.0;
	res1 = (-b + sqrt(b*b - 4 * a*c)) / (2 * a);
	res2 = (-b - sqrt(b*b - 4 * a*c)) / (2 * a);
	if (res1 > res2){
		cout << fixed << setprecision(10) << res1 << endl;
		cout << fixed << setprecision(10) << res2 << endl;
	}
	else {
		cout << fixed << setprecision(10) << res2 << endl;
		cout << fixed << setprecision(10) << res1 << endl;
	}

}


#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main(){

	int a, b, c;
	a = b = c = 0;
	cin >> a >> b >> c;
	double res1, res2;
	res1 = res2 = 0.0;
	res1 = (-b + sqrt(float)(b*b - 4 * a*c)) / (2 * a);
	res2 = (-b - sqrt(float)(b*b - 4 * a*c)) / (2 * a);
	if (res1 > res2){
		cout << fixed << setprecision(10) << res1 << endl;
		cout << fixed << setprecision(10) << res2 << endl;
	}
	else {
		cout << fixed << setprecision(10) << res2 << endl;
		cout << fixed << setprecision(10) << res1 << endl;
	}

}


#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main(){

	int a, b, c;
	a = b = c = 0;
	cin >> a >> b >> c;
	double res1, res2;
	res1 = res2 = 0.0;
	res1 = (-b + (float)sqrt(b*b - 4 * a*c)) / (2 * a);
	res2 = (-b - (float)sqrt(b*b - 4 * a*c)) / (2 * a);
	if (res1 > res2){
		cout << fixed << setprecision(10) << res1 << endl;
		cout << fixed << setprecision(10) << res2 << endl;
	}
	else {
		cout << fixed << setprecision(10) << res2 << endl;
		cout << fixed << setprecision(10) << res1 << endl;
	}

}


#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
const int mod=1e9+7;
const double c=11*1e-9;

long long int d(long long int a){
	return (a+1)/2;
}

void solve(int n){
	long long int a=n,b,c;
	scanf("%I64d%I64d",&b,&c);
	printf("%lf\n%lf",(-b+sqrt(b*b-4*a*c))/2/a,(-b-sqrt(b*b-4*a*c))/2/a);
}

int main(){
#ifdef _DEBUG
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif _DEBUG

	int n,m,x,y,i,j,q=0;
	while(scanf("%d",&n)!=EOF){
		solve(n);
		printf("\n");
	}

	return 0;
}


#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
const int mod=1e9+7;
const double c=11*1e-9;

long long int d(long long int a){
	return (a+1)/2;
}

void solve(int n){
	long long int a=n,b,c;
	scanf("%I64d%I64d",&b,&c);
	double x1=(-b+sqrt(1.0*b*b-4*a*c))/2/a,x2=(-b-sqrt(1.0*b*b-4*a*c))/2/a;
	printf("%lf\n%lf",max(x1,x2),min(x1,x2));
}

int main(){
#ifdef _DEBUG
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif _DEBUG

	int n,m,x,y,i,j,q=0;
	while(scanf("%d",&n)!=EOF){
		solve(n);
		printf("\n");
	}

	return 0;
}


#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
const int mod=1e9+7;
const double c=11*1e-9;

long long int d(long long int a){
	return (a+1)/2;
}

void solve(int n){
	long long int a=n,b,c;
	scanf("%I64d%I64d",&b,&c);
	printf("%lf\n%lf",(-b+sqrt(1.0*b*b-4*a*c))/2/a,(-b-sqrt(1.0*b*b-4*a*c))/2/a);
}

int main(){
#ifdef _DEBUG
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif _DEBUG

	int n,m,x,y,i,j,q=0;
	while(scanf("%d",&n)!=EOF){
		solve(n);
		printf("\n");
	}

	return 0;
}


#include <iostream>
#include <algorithm>
#include <set>
#include <map>
#include <string>
#include <math.h>
#include <fstream>
#include <queue>
#include <vector>
#include <cstring>
#include <iomanip>
using namespace std;

typedef long long ll;
typedef long double ld;

int mas[504][504];
int rez[504][504];
//vector <int> v[504];
//bool flag = true;
//int viz[504];

int main() {
	//ifstream cin("input.txt");
	//ll n;
	//cin >> n;
	//ll t = n*(n - 1)*(n - 2)*(n - 3)*(n - 4) / 120
	//	+ n*(n - 1)*(n - 2)*(n - 3)*(n - 4)*(n - 5) / 720
	//	+ n*(n - 1)*(n - 2)*(n - 3)*(n - 4)*(n - 5)*(n - 6) / 5040;
	//cout << t;

	ld a, b, c, d, x1, x2;
	cin >> a >> b >> c;
	d = (b*b) - (4 * a*c);

		x1 = (-b + sqrt(d)) / (2 * a);
		x2 = (-b - sqrt(d)) / (2 * a);
		cout << fixed << setprecision(7) <<  max(x1,x2) << endl;
		cout << fixed<< setprecision(7) << min(x2,x1) << endl;
}


#include <iostream>
#include <algorithm>
#include <set>
#include <map>
#include <string>
#include <math.h>
#include <fstream>
#include <queue>
#include <vector>
#include <cstring>
#include <iomanip>
using namespace std;

typedef long long ll;
typedef long double ld;

int mas[504][504];
int rez[504][504];
//vector <int> v[504];
//bool flag = true;
//int viz[504];

int main() {
	//ifstream cin("input.txt");
	//ll n;
	//cin >> n;
	//ll t = n*(n - 1)*(n - 2)*(n - 3)*(n - 4) / 120
	//	+ n*(n - 1)*(n - 2)*(n - 3)*(n - 4)*(n - 5) / 720
	//	+ n*(n - 1)*(n - 2)*(n - 3)*(n - 4)*(n - 5)*(n - 6) / 5040;
	//cout << t;

	ld a, b, c, d, x1, x2;
	cin >> a >> b >> c;
	d = (b*b) - (4 * a*c);

		x1 = (-b + sqrt(d)) / (2 * a);
		x2 = (-b - sqrt(d)) / (2 * a);
		cout << fixed << setprecision(7) <<  x1 << endl;
		cout << fixed<< setprecision(7) << x2 << endl;
}