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

public class Square_Numbers
{
    public static void Main()
    {
        var numbers = Console.ReadLine()
            .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
            .Select(int.Parse)
            .Where(x => x >= 0)
            .ToList();

        var squareNumbers = new List<int>();

        foreach (var number in numbers)
        {
            var square = (int)Math.Sqrt(number);

            if (square * square == number)
            {
                squareNumbers.Add(number);
            }
        }

        Console.WriteLine(string.Join(" ", squareNumbers.OrderByDescending(x => x)));
    }
}