import Foundation

func terms1(s:String) -> Bool {
    return s == String(s.reversed())
}

func terms2(s:String) -> Bool {
    return s.prefix((s.count - 1) / 2) == String(s.prefix((s.count - 1) / 2).reversed())
}

func terms3(s:String) -> Bool {
    return s.suffix(s.count - (s.count + 3) / 2 + 1) == s.suffix(s.count - (s.count + 3) / 2 + 1).reversed()
}

func main() {
    let s = readLine()!

    print(terms1(s: s) && terms2(s: s) && terms3(s: s) ? "Yes": "No")
}
main()


import Foundation

let input = readLine()!
let N = input.count

let firstString  = input
let endString = input

let firstPalindrome = input.dropLast((N - 1) / 2 + 1).map{ String($0)}
let endPalindrome = input.dropFirst((N + 3) / 2 - 1).map{ String($0)}

let StringNums = firstString.count
let halfNums = StringNums / 2

var firstReversed: [String] = []
var endReversed: [String] = []

for i in (0...halfNums - 1).reversed() {
    firstReversed.append(firstPalindrome[i])
    endReversed.append(endPalindrome[i])
}

if firstPalindrome == firstReversed && endPalindrome == endReversed && firstReversed == endPalindrome {
    print("Yes")
} else {
    print("No")
}


import Foundation
func isValid(s: String, start: Int, end: Int) -> Bool {
  if start > end {
    return false
  }
  var left = start
  var right = end
  let S = s.characters.map { String($0) }
  while left < right {
    if S[left] != S[right] {
    	return false
    }
    left += 1
    right -= 1
  }
  return true
}
let str = String(readLine()!)
let count = str.characters.count
let isStrong = isValid(str, start: 0, end: (count - 1) / 2 - 1) &&
			   isValid(str, start: 0, end: count - 1) &&
               isValid(str, start: (count + 3) / 2 - 1, end: str.characters.count - 1)

print(isStrong ? "Yes" : "No")


import Foundation

let input = readLine()!
let N = input.count

let firstString  = input
let endString = input

let firstPalindrome = input.dropLast((N - 1) / 2 + 1).map{ String($0)}
let endPalindrome = input.dropFirst((N + 3) / 2 - 1).map{ String($0)}

let StringNums = firstString.count
let halfNums = StringNums / 2

var firstReversed: [String] = []
var endReversed: [String] = []

for i in (0...halfNums - 1).reversed() {
    firstReversed.append(firstPalindrome[i])
    endReversed.append(endPalindrome[i])
}

if firstPalindrome == firstReversed && endPalindrome == endReversed {
    print("Yes")
} else {
    print("No")
}


import Foundation

let input = readLine()!
let N = input.count

let firstString  = input
let endString = input

let firstPalindrome = input.dropLast((N - 1) / 2 + 1).map{ String($0)}
let endPalindrome = input.dropFirst((N + 3) / 2 - 1).map{ String($0)}

let StringNums = firstString.count
let halfNums = StringNums / 2

for i in 0...halfNums - 1 {
    if firstPalindrome[i] != firstPalindrome[halfNums - i - 1] || endPalindrome[i] != endPalindrome[halfNums - i - 1] {
        print("No")
        break
    } else if i == halfNums - 1 {
        print("Yes")
    }
}


import Foundation
func isValid(s: String, start: Int, end: Int) -> Bool {
  if start > end {
    return false
  }
  var left = start
  var right = end
  let S = s.characters.map { String($0) }
  while left < right {
    if S[left] != S[right] {
    	return false
    }
    left += 1
    right -= 1
  }
  return true
}
let str = String(readLine()!)
let count = str.characters.count
let isStrong = isValid(str, start: 0, end: (count - 1) / 2 - 1) &&
               isValid(str, start: (count + 3) / 2 - 1, end: str.characters.count - 1)

print(isStrong ? "Yes" : "No")


function Main(arg: string) {
  const input = arg.split('\n')[0];
  const length = input.length;
  const a = check(input);
  const b = check(input.substr(0, (length  -1)/2 ));
  const c = check(input.substr((length +3)/2 - 1));
  console.log(a && b && c ? 'Yes': 'No');
}

function check(str: string) {
  const length = str.length;
  for (let i = 0; i < Math.floor(length / 2); i++) {
    if (str.charAt(i) !== str.charAt(length - i - 1))return false;
  }
  return true;
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function main(input) {
  const inputs =input.split('\n')
  const [S] = inputs[0].split(' ')
  const N = S.length
  const h = S.slice(0, (N-1)/2)
  const t = S.slice((N+2)/2, N)

  if (h !== t) {
    console.log('No')
    return
  }
  for (let i = 0; i < (h.length-1)/2; i++) {
    if (h[i] !== h[h.length-1-i]) {
      console.log('No')
      return
    }
  }
  console.log('Yes')
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))


export class Main {
  static main(input: string): string {
    const tmp: string[] = input.split("\n");
    const s: string = tmp.shift().split(" ")[0];
    for (let i = 0, len = (s.length - 1) / 2; i < len; i++) {
      if (s.charAt(i) != s.charAt(s.length - 1 - i)) {
        return "No";
      }
    }
    const sh: string = s.substr(0, (s.length - 1) / 2);
    for (let i = 0, len = (sh.length - 1) / 2; i < len; i++) {
      if (sh.charAt(i) != sh.charAt(sh.length - 1 - i)) {
        return "No";
      }
    }
    return `Yes`;
  }
}
console.log(Main.main(require("fs").readFileSync("/dev/stdin", "utf8")));


function main(input) {
  const inputs =input.split('\n')
  const [S] = inputs[0].split(' ')
  const N = S.length
  const h = S.slice(0, (N-1)/2)
  const t = S.slice((N+2)/2, N)

  if (h.length % 2 === 0) {
    console.log('No')
    return
  } else if (h !== t) {
    console.log('No')
    return
  }
  for (let i = 0; i < (h.length-1)/2; i++) {
    if (h[i] !== h[h.length-1-i]) {
      console.log('No')
      return
    }
  }
  console.log('Yes')
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))


function Main(arg: string) {
  const input = arg.split('\n')[0];
  const length = input.length;
  const a = check(input);
  const b = check(input.substr(0, (length  -1)/2 ));
  const c = check(input.substr((length +3)/2 - 1));
  console.log(input.substr(0, (length  -1)/2), input.substr((length +3)/2 - 1) ),
  console.log(a && b && c ? 'Yes': 'No');
}

function check(str: string) {
  const length = str.length;
  for (let i = 0; i < Math.floor(length / 2); i++) {
    if (str.charAt(i) !== str.charAt(length - i - 1))return false;
  }
  return true;
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e-a > k :
  print(":(")
else :
  print("Yay!")


lis = []

for i in range(5):
    lis.append(int(input()))

NUM = int(input())

count = 0
correct = 0
for i in range(5):
    for k in range(i + 1, 5):
        if lis[k] - lis[i] <= NUM and lis[i] - lis[k] <= NUM:
            correct += 1
        count += 1

if count == correct:
    print('Yay!')
else:
    print(':(')


crd = []
a = int(input())
crd.append(a)
b = int(input())
crd.append(b)
c = int(input())
crd.append(c)
d = int(input())
crd.append(d)
e = int(input())
crd.append(e)
k = int(input())

#print(len(crd))
for x in range(len(crd)):
    for y in range(x+1, len(crd)-x):
        #print(x, y)
        #print(crd[int(x)], crd[int(y)])
        z = k - (crd[y] - crd[x])
        #print("z= ", z)
        if z < 0:
            print(":(")
            break
    else:
        continue
    break
else:
    print("Yay!")


a = [int(input()) for x in range(5)]
k = int(input())

flg = True

for i, x in enumerate(a):
  for j, y in enumerate(a):
    if i == j:
      continue

    flg = flg and abs(y-x) > k

print('Yay!' if flg else ":(")


k=0
l=[]
for i in range(6):
    l.append(int(input()))
for i in range(1,5):
    if l[i]-l[i-1]>l[5]:
        k+=1
        break
if k==0:
    print("Yay!")
else:
    print(":(")


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

int main(){
  int a,b,c,d,e,k;
  cin >> a >> b >> c >> d >> e >> k;

  if( e - a > k){
    cout << ":(";
  }else{
    cout << "Yay!";
  }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	static int[][] memo;

	public static int hoge(int current, int n, String last) {
		return 0;
	}

	public static void main(String[] args) throws IOException {
		BufferedReader bf = null;
		bf = new BufferedReader(new InputStreamReader(System.in));
		int a,e,k;
		String str;
		str = bf.readLine();
		a = Integer.parseInt(str);
		str = bf.readLine();
		str = bf.readLine();
		str = bf.readLine();
		str = bf.readLine();
		e = Integer.parseInt(str);
		str = bf.readLine();
		k = Integer.parseInt(str);
		if(e-a <= k) {
			System.out.println("Yay!");
		} else {
			System.out.println(":(");
		}
	}
}


import java.io.*;
import java.util.*;
import java.util.Map.Entry;

public class Main {

	final boolean isDebug = false;
	String fileName = "input.txt";
	FastScanner sc;
	PrintWriter out;
	final int MOD = (int)1e9+7;
	final int INF = Integer.MAX_VALUE / 2;

	void solve() throws Exception{
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int D = sc.nextInt();
		int E = sc.nextInt();
		int K = sc.nextInt();

		if(E - A <= K){
			System.out.println("Yay!");
		}else{
			System.out.println(":(");
		}
	}

	/* end solve */

	/* main */
	public static void main(String[] args) throws Exception {
		new Main().m();
	}

	void m() throws Exception {
		long S = System.currentTimeMillis();
		sc = (isDebug) ? new FastScanner(new FileInputStream(fileName)) : new FastScanner(System.in);
		out = new PrintWriter(System.out);
		solve();
		out.flush();
		long G = System.currentTimeMillis();
		if(isDebug){
			System.out.println("---Debug---");
			System.out.printf("%8d ms", (G-S));
		}
	}
	/* end main */
}
/* end Main */

class UnionFind{
	int[] par;
	int[] rank;
	int[] size;
	//親ノードとの重さの差分
	int[] diffWeight;
	int group;

	UnionFind(int n){
		par = new int[n];
		rank = new int[n];
		size = new int[n];
		diffWeight = new int[n];
		group = n;
		for(int i = 0; i < n; i++){
			par[i] = i;
			rank[i] = 0;
			size[i] = 1;
			diffWeight[i] = 0;
		}
	}

	//経路圧縮しながらrootを求める
	int find(int x){
		if(par[x] == x){
			return x;
		}else{
			int f = find(par[x]);
			//累積和を計算する
			diffWeight[x] += diffWeight[par[x]];
			return par[x] = f;
		}
	}

	int weight(int x){
		find(x);
		return diffWeight[x];
	}

	//xのほうがrootに近ければ(ポテンシャルが低ければ)値は正になる
	int diff(int x, int y){
		return weight(y) - weight(x);
	}

	//ランクの小さいほうにつなげる
	boolean union(int x, int y, int w){
		w += weight(x);
		w -= weight(y);
		x = find(x);
		y = find(y);
		if(x == y) return false;

		if(rank[x] < rank[y]){
			int tmp = x; x = y; y = tmp;
			w = -w;
		}

		//y(のroot)をx(のroot)の下にくっつける
		//yのほうが重くなる(ポテンシャルが高くなる)
		if(rank[x] == rank[y]) rank[x]++;
		group--;
		par[y] = x;
		size[x] += size[y];
		diffWeight[y] = w;

		return true;
	}

	boolean union(int x, int y){
		return union(x, y, 0);
	}

	boolean isSame(int x, int y){
		return find(x) == find(y);
	}
}

class Edge implements Comparable<Edge>{
	int from;
	int to;
	int cost;
	public Edge(int f, int t, int c){
		from = f;
		to = t;
		cost = c;
	}
	@Override
	public int compareTo(Edge o) {
		if(this.cost == o.cost) return 0;
		else{
			return (this.cost < o.cost) ? -1 : 1;
		}
	}
}

class FastScanner {
    private InputStream in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    public FastScanner(InputStream in) {
		this.in = in;
	}
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() {
    	if (hasNextByte()) return buffer[ptr++];
    	else return -1;
    }
    private static boolean isPrintableChar(int c){
    	return 33 <= c && c <= 126;
    }
    public boolean hasNext() {
    	while(hasNextByte() && !isPrintableChar(buffer[ptr]))
    		ptr++; return hasNextByte();
    }
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() {
    	return Double.parseDouble(next());
    }
}


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.NoSuchElementException;
import java.util.stream.IntStream;

public class Main {

	public static void main(String[] args) throws IOException {
		new Main().solve();
	}

	private void solve() throws IOException {
		try {
			solveA();
			//			solveB();
			//			solveC();
			//			 solveD();
			//			 solveE();
			//			 solveF();
		} finally {
			if (in != null) {
				in.close();
			}
			if (out != null) {
				out.flush();
				out.close();
			}
		}

	}

	private void solveA() {
		int numA = nextInt();
		int numB = nextInt();
		int numC = nextInt();
		int numD = nextInt();
		int numE = nextInt();
		int numK = nextInt();

		int[] wk = new int[] { numA, numB, numC, numD, numE };
		Arrays.sort(wk);
		if (wk[4] - wk[0] > numK) {
			out.println(":(");
			return;
		}

		//		if (Math.abs(numA - numB) > numK) {
		//			out.println(":(");
		//			return;
		//		}
		//		if (Math.abs(numA - numC) > numK) {
		//			out.println(":(");
		//			return;
		//		}
		//		if (Math.abs(numA - numD) > numK) {
		//			out.println(":(");
		//			return;
		//		}
		//		if (Math.abs(numA - numE) > numK) {
		//			out.println(":(");
		//			return;
		//		}
		//		if (Math.abs(numB - numC) > numK) {
		//			out.println(":(");
		//			return;
		//		}
		//		if (Math.abs(numB - numD) > numK) {
		//			out.println(":(");
		//			return;
		//		}
		//		if (Math.abs(numB - numE) > numK) {
		//			out.println(":(");
		//			return;
		//		}
		//		if (Math.abs(numC - numD) > numK) {
		//			out.println(":(");
		//			return;
		//		}
		//		if (Math.abs(numC - numE) > numK) {
		//			out.println(":(");
		//			return;
		//		}
		//		if (Math.abs(numD - numE) > numK) {
		//			out.println(":(");
		//			return;
		//		}

		out.println("Yay!");
	}

	private static class SortComparator implements Comparator<Integer> {

		@Override
		public int compare(Integer o1, Integer o2) {
			int sabun1 = (o1 % 10);
			int sabun2 = (o2 % 10);

			if (sabun1 == 0) {
				return -1;
			}
			if (sabun2 == 0) {
				return 1;
			}
			sabun1 = 10 - sabun1;
			sabun2 = 10 - sabun2;
			if (sabun1 < sabun2) {
				return -1;
			} else if (sabun1 < sabun2) {
				return 1;
			} else {
				return 0;
			}
		}

	}

	private void solveB() {
		Integer[] wk = new Integer[5];
		for (int i = 0; i < wk.length; i++) {
			wk[i] = nextInt();
		}

		Arrays.sort(wk, new SortComparator());

		int res = 0;
		for (int i = 0; i < wk.length; i++) {

			if (res % 10 != 0) {
				int temp = 10 - res % 10;
				res += temp;
			}
			res += wk[i];
		}
		out.println(res);
	}

	private void solveC() {
		int numN = nextInt();

		int[] wk = IntStream.range(0, numN).toArray();
	}

	private void solveD() {
		int numN = nextInt();

		out.println("");
	}

	private void solveE() {
		int numN = nextInt();

		out.println("");
	}

	private void solveF() {
		int numN = nextInt();

		out.println("");
	}

	private final PrintWriter out = new PrintWriter(System.out);
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) {
				return false;
			}
		}
		return true;
	}

	private int readByte() {
		if (hasNextByte())
			return buffer[ptr++];
		else
			return -1;
	}

	private static boolean isPrintableChar(int c) {
		return 33 <= c && c <= 126;
	}

	private void skipUnprintable() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
	}

	public boolean hasNext() {
		skipUnprintable();
		return hasNextByte();
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public String next() {
		if (!hasNext())
			throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int b = readByte();
		while (isPrintableChar(b)) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	public long nextLong() {
		if (!hasNext())
			throw new NoSuchElementException();
		long n = 0;
		boolean minus = false;
		int b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b) {
			throw new NumberFormatException();
		}
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b)) {
				return minus ? -n : n;
			} else {
				throw new NumberFormatException();
			}
			b = readByte();
		}
	}
}


import java.util.*;
public class Main{
  public static void main(String[] args){
  	Scanner sc = new Scanner(System.in);
    int[] nums = new int[5];
    for(int i = 0;i < 5;i++){
      nums[i] = sc.nextInt();
    }
    int tail = Integer.MAX_VALUE;
    int min = 0;
    for(int j : nums){
      	int temp = j % 10;
    	if(temp != 0 && tail > temp){
        	tail = temp;
          	min = j;
        }
    }
    int sum = 0;
    for(int j : nums){
    	if(j != min){
          if(j % 10 == 0){
             sum += j;
          }else{
            sum += (j / 10) *10 + 10;
          }
        }
    }
    System.out.println(sum + min);
  }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int a[] = new int[5];

		for (int i = 0; i < 5; i++) {
			a[i] = Integer.parseInt(br.readLine());
		}
		int k = Integer.parseInt(br.readLine());

		for (int i = 0; i < 4; i++) {
			if (a[i + 1] - a[i] > k) {
				System.out.println(":(");
				return;
			}
		}

		System.out.println("Yay!");
	}
}


import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;

public class Main {

	static Scanner sc = new Scanner(System.in);

	static class FastScanner {
		private final InputStream in;
		private final byte[] buffer = new byte[1024];
		private int ptr = 0;
		private int buflen = 0;

		public FastScanner(InputStream source) {
			in = source;
		}

		private boolean hasNextByte() {
			if (ptr < buflen) {
				return true;
			} else {
				ptr = 0;
				try {
					buflen = in.read(buffer);
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (buflen <= 0) {
					return false;
				}
			}
			return true;
		}

		private int readByte() {
			if (hasNextByte())
				return buffer[ptr++];
			else
				return -1;
		}

		private static boolean isPrintableChar(int c) {
			return 33 <= c && c <= 126;
		}

		public boolean hasNext() {
			while (hasNextByte() && !isPrintableChar(buffer[ptr]))
				ptr++;
			return hasNextByte();
		}

		public String next() {
			if (!hasNext())
				throw new NoSuchElementException();
			StringBuilder sb = new StringBuilder();
			int b = readByte();
			while (isPrintableChar(b)) {
				sb.appendCodePoint(b);
				b = readByte();
			}
			return sb.toString();
		}

		public long nextLong() {
			if (!hasNext())
				throw new NoSuchElementException();
			long n = 0;
			boolean minus = false;
			int b = readByte();
			if (b == '-') {
				minus = true;
				b = readByte();
			}
			if (b < '0' || '9' < b) {
				throw new NumberFormatException();
			}
			while (true) {
				if ('0' <= b && b <= '9') {
					n *= 10;
					n += b - '0';
				} else if (b == -1 || !isPrintableChar(b)) {
					return minus ? -n : n;
				} else {
					throw new NumberFormatException();
				}
				b = readByte();
			}
		}

		public int nextInt() {
			long nl = nextLong();
			if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
				throw new NumberFormatException();
			return (int) nl;
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}
	}

	/**
	 * Compute n! mod. p, (n!)^(-1) mod.p
	 *
	 * @param fac[]
	 *            : n! mod. p
	 * @param finv[]
	 *            : (n!)^(-1) mod. p
	 * @param MAX
	 *            :
	 * @param MOD
	 *            :
	 */

	static void hz_COMinit(long fac[], long finv[], long inv[], final int MAX, final long MOD) {
		fac[0] = fac[1] = 1L;
		finv[0] = finv[1] = 1L;
		inv[1] = 1L;
		for (int i = 2; i < MAX; i++) {
			fac[i] = fac[i - 1] * i % MOD;
			inv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;
			finv[i] = finv[i - 1] * inv[i] % MOD;
		}
	}
	/*
	 * static void hz_COMinit(long fac[], long finv[], long inv[],final int MAX,
	 * final long MOD) { fac[0] = fac[1] = 1L; finv[0] = finv[1] = 1L; inv[1] =
	 * 1L; for (int i = 2; i < MAX; i++){ fac[i] = (BigInteger.valueOf(fac[i -
	 * 1]).multiply(BigInteger.valueOf(i)).mod(BigInteger.valueOf(MOD))).
	 * longValue(); inv[i] =
	 * (BigInteger.valueOf(MOD).subtract(BigInteger.valueOf(inv[(int)(MOD%i)]).
	 * multiply(BigInteger.valueOf(MOD/i)).mod(BigInteger.valueOf(MOD)))).
	 * longValue(); finv[i] = (BigInteger.valueOf(finv[i -
	 * 1]).multiply(BigInteger.valueOf(inv[i])).mod(BigInteger.valueOf(MOD))).
	 * longValue(); } }
	 */

	/**
	 * @Compute nCk(二項係数計算) mod. p
	 * @param fac[]
	 *            : n! mod. p
	 * @param finv[]
	 *            : (n!)^(-1) mod. p
	 * @return :nCk(二項係数計算) mod. p
	 */
	static long hz_COM(long fac[], long finv[], int n, int k, final long MOD) {
		if (n < k)
			return 0;
		if (n < 0 || k < 0)
			return 0;
		return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
	}
	/*
	 * static long hz_COM(long fac[],long finv[], int n, int k, final long MOD){
	 * if (n < k) return 0; if (n < 0 || k < 0) return 0; return
	 * BigInteger.valueOf(fac[n]) .multiply(BigInteger.valueOf(finv[k])
	 * .multiply(BigInteger.valueOf(finv[n - k])) .mod(BigInteger.valueOf(MOD))
	 * ) .mod(BigInteger.valueOf(MOD)).longValue(); }
	 */

	static int hz_swap(int a, int b) {
		if (a >= b)
			return a;
		else
			return b;
	}

	static long hz_swap(long a, long b) {
		if (a >= b)
			return a;
		else
			return b;
	}

	// mod上での差分
	static long hz_modSub(long a, long b, long mod) {
		long v = a - b;
		if (v < 0)
			v += mod;
		return v % mod;
	}

	// mod上での割算
	static long hz_modDiv(long a, long b, long mod) {
		return (a % mod) * hz_modInv(b, mod) % mod;
	}

	// 逆元
	static long hz_modInv(long a, long mod) {
		return hz_modPow(a, mod - 2L, mod);
	}

	// mod上での累乗
	static long hz_modPow(long n, long k, long mod) {

		long result = 1L;

		// k を右シフトしつつ n を 2 乗していく
		while (k > 0L) {
			// k の最下ビットが 1 なら、今の n を答えに掛ける
			if ((k & 1L) == 1L)
				result = (result * n) % mod;
			n = n * n % mod;
			k >>= 1L;
		}

		return result;
	}

	// Union Find Tree
	static class HZ_UF {

		public int[] par;
		public int[] rank;

		public HZ_UF(int n) {
			this.par = new int[n + 1];
			this.rank = new int[n + 1];

			Arrays.fill(par, -1);
			Arrays.fill(rank, 0);
		}

		public void unite(int x, int y) {
			link(root(x), root(y));
		}

		public boolean link(int x, int y) {
			if (x == y)
				return false;
			if (rank[x] > rank[y]) {
				par[x] += par[y];
				par[y] = x;
			} else {
				par[y] += par[x];
				par[x] = y;
				if (rank[x] == rank[y])
					rank[y]++;
			}
			return true;
		}

		public boolean isSame(int x, int y) {
			return root(x) == root(y);
		}

		public int root(int x) {
			if (par[x] < 0)
				return x;
			else
				return x = root(par[x]);
		}

		public int size(int x) {
			return -par[root(x)];
		}
	}

	public static void main(String[] args) {

		solve_abc123_d();
	}

	public static void solve_abc123_d() {

		FastScanner sc = new FastScanner(System.in);

		int x = sc.nextInt();
		int y = sc.nextInt();
		int z = sc.nextInt();
		int k = sc.nextInt();

		ArrayList<Long> a = new ArrayList<>(x);
		ArrayList<Long> b = new ArrayList<>(y);
		ArrayList<Long> c = new ArrayList<>(z);

		for(int i=0;i<x;i++) a.add(sc.nextLong());
		for(int i=0;i<y;i++) b.add(sc.nextLong());
		for(int i=0;i<z;i++) c.add(sc.nextLong());

		/*
		boolean[][][] isAdd = new boolean[x][y][z];
		for(int i=0;i<x;i++){
			for(int j=0;j<y;j++){
				Arrays.fill(isAdd[i][j], false);
			}
		}
		*/

		Set<solve_abc123_d_cake> isAdd = new HashSet<>(Math.min(k, 3000) + 1);

		a.sort(Collections.reverseOrder());
		b.sort(Collections.reverseOrder());
		c.sort(Collections.reverseOrder());

		PriorityQueue<solve_abc123_d_cake> pq
			= new PriorityQueue<>((p1, p2)->Long.compare(p2.p, p1.p));

		ArrayList<Long> ans = new ArrayList<>(k);

		solve_abc123_d_cake start = new solve_abc123_d_cake(a.get(0)+b.get(0)+c.get(0), 0, 0, 0);
		pq.add(start);
		isAdd.add(start);
		int count = 0;

		while(!pq.isEmpty() && count < Math.min(k, 3000)){
			solve_abc123_d_cake now	= pq.poll();

			//System.out.println(now.p + "\t" + now.ai + "\t" + now.bi + "\t" + now.ci);

			if(now.ai+1 < x){
				solve_abc123_d_cake candidate =
						new solve_abc123_d_cake(a.get(now.ai+1)+b.get(now.bi)+c.get(now.ci),now.ai+1, now.bi, now.ci);
				if(!isAdd.contains(candidate)){
					pq.add(candidate);
					isAdd.add(candidate);
				}
			}

			if(now.bi+1 < y){
				solve_abc123_d_cake candidate =
						new solve_abc123_d_cake(a.get(now.ai)+b.get(now.bi+1)+c.get(now.ci),now.ai, now.bi+1, now.ci);
				if(!isAdd.contains(candidate)){
					pq.add(candidate);
					isAdd.add(candidate);
				}
			}

			if(now.ci+1 < z){
				solve_abc123_d_cake candidate =
						new solve_abc123_d_cake(a.get(now.ai)+b.get(now.bi)+c.get(now.ci+1),now.ai, now.bi, now.ci+1);
				if(!isAdd.contains(candidate)){
					pq.add(candidate);
					isAdd.add(candidate);
				}
			}

			ans.add(now.p);
			count++;
		}

		StringBuilder sb = new StringBuilder();
		for(Long l:ans) sb.append(l + "\r\n");

		System.out.println(sb);

		//for(Long l:ans) System.out.println(l);
	}

	public static class solve_abc123_d_cake{
		public Long p;
		public int ai;
		public int bi;
		public int ci;
		solve_abc123_d_cake(Long p, int ai, int bi, int ci){
			this.p = p;
			this.ai = ai;
			this.bi = bi;
			this.ci = ci;
		}

		@Override
		public int hashCode(){
			return Objects.hash(ai, bi, ci);
		}

		@Override
		public boolean equals(Object obj){
			solve_abc123_d_cake other = (solve_abc123_d_cake) obj;
			return ai == other.ai && bi == other.bi && ci == other.ci;
		}

	}

}


#include <cstdio>

int main() {
  int a[5];
  for (int i = 0; i < 5; ++i) scanf("%d", &a[i]);
  int k;
  scanf("%d", &k);
  for (int i = 0; i < 5; ++i)
    for (int j = 0; j < i; ++j)
      if (a[i] - a[j] > k)
        return puts(":("), 0;

  puts("Yay!");
}


#include<stdio.h>
#include<stdlib.h>
int main(){
    int a ,b ,c ,d ,e , f;
    scanf("%d%d%d%d%d%d", &a,&b,&c,&d,&e,&f);
    int arr[] = {a,b,c,d,e} ;
    int i , j  , count = 0 ;
    for(i = 0 ; i < 4 ; i++){
        for(j=i+1 ; j<5 ; j++){
            if((arr[j]-arr[i]) > f){
                count++;
                //printf("%d - %d = %d \n" , arr[j], arr[i] ,arr[j] - arr[i]);

            }

        }
    }
    if(count >0){
        printf(":(");
    }else{
        printf("Yay!");
    }

}


#include <stdio.h>
int main(){
  int a, b, c, d, e, k;
  scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &k);

  if( ((a-b)<=k) && ((a-c)<=k) && ((a-d)<=k) && ((a-e)<=k) && ((b-a)<=k) && ((b-c)<=k) && ((b-d)<=k) && ((b-e)<=k) && ((c-a)<=k) && ((c-b<=k)) && ((c-d)<=k) && ((c-e)<=k) && ((d-a)<=k) && ((d-b)<=k) && ((d-c)<=k) && ((d-e)<=k) && ((e-a)<=k) && ((e-b)<=k) && (e-c)<=k && (e-d)<=k)
    printf("Yay!\n");
  else printf(":(\n");

  return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//cout << fixed << setprecision(15);
vector<int> forintinput(int n) {
	vector<int> x;
	for(int i = 0;i < n;i++){
		int ia;
		cin >> ia;
		x.push_back(ia);
	}
	return x;
}
int main(){
	int a,b,c,d,e,k;
	cin >> a >> b >> c >> d >> e >> k;
	if(e-a >= k){
		cout << ":(" << endl;
	}else{
		cout << "Yay!" << endl;
	}
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int (i)=0;(i)<(n);i++)
#define INF 1001001001
#define LLINF 1001001001001001001
#define MOD 1000000007
#define FOUT(n, dist) cout<<fixed<<setprecision(n)<<(dist);
#define BR cout<<endl;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define ALL(v) v.begin(), v.end()
typedef long long ll;
const ll mod=1000000007;

ll powmod(ll x,ll y){
    ll res=1;
    for(ll i=0;i<y;i++){
        res=res*x%mod;
    }
    return res;
}

double expect(int x){
    double kitai,tem=0;
    for(int i=1;i<=x;i++){
        tem += i;
    }
    kitai = tem/x;
    cout << kitai << endl;
    return kitai;

}

int main(){
    int dist[5];
    rep(i,5)cin >> dist[i];

    int k;
    cin >> k;

    for(int j = 0;j < 4 ;j++){
    for(int i = 0;i < 4;i++){
        if(dist[i] - dist[j] > k){
            cout << ":(" << endl;
            return 0;
        }
    }
    }

    cout << "Yay!" << endl;

    return 0;
}


#include <iostream>
#include <fstream>
#include <set>
#include <map>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <stack>
#include <functional>
#include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
using namespace std;
#define ll long long int
#define rep(i,n) for( int i = 0; i < n; i++ )
#define rrep(i,n) for( int i = n; i >= 0; i-- )
#define REP(i,s,t) for( int i = s; i <= t; i++ )
#define RREP(i,s,t) for( int i = s; i >= t; i-- )
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define INF 2000000000
#define mod 1000000007
#define INF2 1000000000000000000

int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a, b, c, d, e, k;
    cin >> a >> b >> c >> d >> e >> k;
    if(e - a < k) {
        cout << "Yay!" << endl;
    } else {
        cout << ":(" << endl;
    }

    return 0;
}


#include <stdio.h>

void print(void)
{
        printf(":(\n");
        return ;
}
int main(void)
{
        int a,b,c,d,e,k;
        scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&k);

        if(b-a>k)print();
        else if(c-a>k)print();
        else if(d-a>k)print();
        else if(e-a>k)print();
        else if(c-b>k)print();
        else if(d-b>k)print();
        else if(e-b>k)print();
        else if(d-c>k)print();
        else if(e-c>k)print();
        else if(e-d>k)print();
        else printf("Yay!\n");
        return 0;
}


#include <stdio.h>

int main(){
  int densen[5];
  for(int i=0; i<5; i++){
    scanf("%d", &densen[i]);
  }
  int k;
  scanf("%d", &k);

  //全探索
  int hasConnection = 0; //0でAllOK、1で通信できない
  for(int i=0; i<5; i++){
    for(int j=0; j<5; j++){
      if((densen[i] - densen[j]) > k) hasConnection = 1;
    }
  }

  if(hasConnection == 1){
    printf(":(");
  }else{
    printf("Yay!");
  }

}


#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#define MAX 1000
typedef long long ll;
typedef unsigned long long ull;
extern inline int max( int a, int b ) { return a > b ? a : b ; }
extern inline int min( int a, int b ) { return a > b ? b : a ; }
extern inline ll lmax( ll a, ll b ) { return a > b ? a : b ; }
extern inline ll lmin( ll a, ll b ) { return a > b ? b : a ; }
extern inline ull ulmax( ull a, ull b ) { return a > b ? a : b ; }
extern inline ull ulmin( ull a, ull b ) { return a > b ? b : a ; }

int main()
{
	int arr[5];
	int K;

	for( int i=0; i<5; ++i ){
		scanf("%d", arr+i);
	}
	scanf("%d", &K);

	for( int i=0; i<4; ++i ){
		for( int j=i+1; j<5; ++j ){
			if( arr[j] - arr[i] > K ){
				printf(":(\n");
				return 0;
			}
		}
	}
	printf("Yay!\n");
	return 0;
}


#include<stdio.h>
#include<stdlib.h>
int main(void)
{
	int s[5];
	int k;
	int p=0;

	for(int i=0;i<5;i++)
		scanf("%d",&s[i]);
	scanf("%d",&k);

	for(int i=0;i<4;i++)
	{
		for(int n=1;n+i<5;n++)
		{
			if(abs(s[i]-s[n+i])<=k){

				p++;
		}

	}

	}

	if(p==20)
	printf("Yay!");

	else
	printf(":(");

	return 0;
}


#include<stdio.h>
int main(void)
{
	int s[5];
	int k;
	int p=0;

	for(int i=0;i<5;i++)
		scanf("%d",&s[i]);
	scanf("%d",&k);

	for(int i=0;i<4;i++)
	{
		for(int n=1;n+i<5;n++)
		{
			if(s[i]-s[n+i]<=k){
				p++;
		}

	}

	}

	if(p==10)
	printf("Yay!");

	else
	printf(":(");

	return 0;
}


#include<stdio.h>
int main(void)
{
	int s[5];
	int k;
	int p=0;

	for(int i=0;i<5;i++)
		scanf("%d",&s[i]);
	scanf("%d",&k);

	for(int i=0;i<4;i++)
	{
		for(int n=1;n+i<5;n++)
		{
			if(s[i]-s[n+i]<=k){
				p++;
		}

	}

	}

	if(p==20)
	printf("Yay!");

	else
	printf(":(");

	return 0;
}


'use strict';

function Main(input) {
  const a = Number(input.split("\n")[0])
  const e = Number(input.split("\n")[4])
  const k = Number(input.split("\n")[5])

  if (e - a <= k) {
    console.log("Yay!")
  } else {
    console.log(":(")
  }
};

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());


// inputに入力データ全体が入る
function Main(input) {
  var a,b,c,d,e,k;
  a = Number(input.split('\n')[0]);
  b = Number(input.split('\n')[1]);
  c = Number(input.split('\n')[2]);
  d = Number(input.split('\n')[3]);
  e = Number(input.split('\n')[4]);
  k = Number(input.split('\n')[5]);

  if(Math.max(e-a,e-b,d-a,e-c,d-b,c-a,e-d,d-c,c-b,b-a) > k){
    console.log(':(');
  }else{
    console.log('Yay!');
  }

}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


'use strict'

const main = input => {
	const args = input.split('\n').map(arg => arg.split(' '))
	const a = parseInt(args[0][0], 10)
	const e = parseInt(args[4][0], 10)
	const k = parseInt(args[5][0], 10)
	if (e - a <= k) console.log('Yay!')
	else console.log(':(')
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))


'use strict';
// inputに入力データ全体が入る
function Main(input) {
  input = input.trim().split("\n");
  let modArr = input.map(function(val){
    val = parseInt(val);
    if(val%10===0){
      return 10;
    }else{
      return val%10;
    }
  });
  let min = modArr.indexOf(Math.min.apply(null, modArr));
  let last = parseInt(input[min]);

  input.splice(min, 1);
  let result =0;
  for(let i = 0 ; i< input.length; i++){
  	let x = Math.ceil(input[i] /10)*10;
    result += x;
  };
  result += last;
  console.log('%d',result);
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


'use strict';
// inputに入力データ全体が入る
function Main(input) {
  input = input.split("\n");
  let modArr = input.map(function(val){
    val = parseInt(val);
    if(val%10===0){
      return 10;
    }else{
      return val%10;
    }
  });
  let min = modArr.indexOf(Math.min.apply(null, modArr));
  let last = parseInt(input[min]);

  input.splice(min, 1);
  let result =0;
  for(let i = 0 ; i< input.length; i++){
  	let x = Math.ceil(input[i] /10)*10;
    result += x;
  };
  result += last;
  console.log(parseInt(result));
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


import * as fs from 'fs';

const main = (input: string) => {
  const lines = input.split("\n").map(str => parseInt(str));
  let answer = 0;
  let maxTime;
  let w: number[] = [];

  lines.forEach((time) => {
    if (time % 10 !== 0) {
      w.push(time % 10)
    }

    answer += (Math.round(time / 10) * 10)
  });

  maxTime = w.reduce((a, b) => Math.min(a, b))

  console.log(answer - maxTime);
};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());


package main

import "fmt"

var a, b, c, d, e, k int

func check() bool {
	if e-d <= k && e-c <= k && e-b <= k && e-a <= k {
		if d-c <= k && d-b <= k && d-a <= k {
			if c-a <= k && b-a <= k {
				return true
			}
		}
	}
	return false
}

func main() {
	fmt.Scan(&a, &b, &c, &d, &e, &k)
	if check() {
		fmt.Println("Yay!")
	} else {
		fmt.Println(":(")
	}
}


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"reflect"
	"sort"
	"strconv"
	"strings"
	// "regexp"
)

/* sort */
type pair struct {
	index  int64
	p1, p2 interface{}
}
type pairs []pair

func (slice pairs) Len() int {
	return len(slice)
}

func (slice pairs) Less(i, j int) bool {
	return slice[i].index < slice[j].index
}

func (slice pairs) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}

/* sort */
type Int64Slice []int64

func (slice Int64Slice) Len() int {
	return len(slice)
}

func (slice Int64Slice) Less(i, j int) bool {
	return slice[i] < slice[j]
}

func (slice Int64Slice) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}
func Int64s(a []int64)                    { sort.Sort(Int64Slice(a)) }
func Int64sSliceAreSorted(a []int64) bool { return sort.IsSorted(Int64Slice(a)) }

const (
	initialBufSize = 1e4
	maxBufSize     = 1e8
	INF            = 1e8
)

var (
	scanner = bufio.NewScanner(os.Stdin)
	writer  = bufio.NewWriter(os.Stdout)
	di      = []int64{-1, 0, 1, 0}
	dj      = []int64{0, -1, 0, 1}
)

func main() {
	buf := make([]byte, initialBufSize)
	scanner.Buffer(buf, maxBufSize)
	scanner.Split(bufio.ScanWords)
	ss := []int64{readInt(), readInt(), readInt(), readInt(), readInt()}
	k := readInt()
	for i := 0; i < len(ss); i++ {
		for j := i + 1; j < len(ss); j++ {
			if k < abs(ss[j]-ss[i]) {
				fmt.Println(":(")
				return
			}
		}
	}
	fmt.Println("Yay!")
}

/*==========================================
 *             Library
 *==========================================*/
func NextPermutation(x sort.Interface) bool {
	n := x.Len() - 1
	if n < 1 {
		return false
	}
	j := n - 1
	for ; !x.Less(j, j+1); j-- {
		if j == 0 {
			return false
		}
	}
	l := n
	for !x.Less(j, l) {
		l--
	}
	x.Swap(j, l)
	for k, l := j+1, n; k < l; {
		x.Swap(k, l)
		k++
		l--
	}
	return true
}
func doubleAry(h int64, w int64, init int64) (res [][]int64) {
	res = make([][]int64, h)
	for i := int64(0); i < h; i++ {
		res[i] = make([]int64, w)
		for j := int64(0); j < w; j++ {
			res[i][j] = init
		}
	}
	return
}

func aryEq(a []int64, b []int64) bool {
	return reflect.DeepEqual(a, b)
}

func clone(n []int64) (r []int64) {
	r = make([]int64, len(n))
	for i := 0; i < len(n); i++ {
		r[i] = n[i]
	}
	return
}
func write(s string) {
	writer.WriteString(s)
}

func print() {
	writer.Flush()
}

// scanner.Split(bufio.ScanWords) をコメントアウトしないと使用不可
func readLine() (s string) {
	if scanner.Scan() {
		s = scanner.Text()
	}
	return s
}

func readInt() (read int64) {
	scanner.Scan()
	read, err := strconv.ParseInt(scanner.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return
}

func readFloat() (read float64) {
	scanner.Scan()
	read, err := strconv.ParseFloat(scanner.Text(), 64)
	if err != nil {
		panic(err)
	}
	return
}

func readRunes() (read []rune) {
	scanner.Scan()
	for _, v := range scanner.Text() {
		read = append(read, v)
	}
	return
}

func readString() (read string) {
	scanner.Scan()
	read = scanner.Text()
	return
}

func readStrings() (read []string) {
	scanner.Scan()
	for _, v := range scanner.Text() {
		read = append(read, string(v))
	}
	return
}

func s2i(s string) int64 {
	var intVal, e = strconv.ParseInt(s, 10, 64)
	if e != nil {
		panic(e)
	}
	return intVal
}

func i2s(i int64) string {
	var strVal = strconv.FormatInt(i, 10)
	return strVal
}

func s2f(s string) float64 {
	var floatVal, e = strconv.ParseFloat(s, 64)
	if e != nil {
		panic(e)
	}
	return floatVal
}

func abs(i int64) int64 {
	return int64(math.Abs(float64(i)))
}

func sum(i []int64) int64 {
	sum := int64(0)
	for _, val := range i {
		sum += val
	}
	return sum
}

func split(s string) []string {
	return strings.Fields(s)
}

func strAry2intAry(strs []string) []int64 {
	var ret = make([]int64, 0, len(strs))
	for _, str := range strs {
		var intVal = s2i(str)
		ret = append(ret, intVal)
	}
	return ret
}

func intAry2strAry(nums []int64) []string {
	var ret = make([]string, 0, len(nums))
	for _, num := range nums {
		var strVal = i2s(num)
		ret = append(ret, strVal)
	}
	return ret
}

func ary2str(strs []string) string {
	return strings.Join(strs, " ")
}

func reverse(res []int64) []int64 {
	for i, j := 0, len(res)-1; i < j; i, j = i+1, j-1 {
		res[i], res[j] = res[j], res[i]
	}
	return res
}
func reverseStr(res []string) []string {
	for i, j := 0, len(res)-1; i < j; i, j = i+1, j-1 {
		res[i], res[j] = res[j], res[i]
	}
	return res
}

func ini(res []int, init int) {
	if len(res) == 0 {
		return
	}
	res[0] = init
	for i := 0; i < len(res); i++ {
		copy(res[i:], res[:i])
	}
}

//
// func regexpExample() {
//     // Your code here!
//     var str = "13:20"
//     r := regexp.MustCompile(`(\d+):(\d+)`)
//     fmt.Println(r.FindStringSubmatch(str))
// }

// type Country struct {
//     gold int
//     silver int
//     blonze int
// }

// // 複数ソートのサンプル
// func stableSortExample() []Country{
//     var country = []Country {
//         {gold:1, silver:2, blonze:3},
//         {gold:1, silver:2, blonze:3},
//         {gold:1, silver:3, blonze:2},
//         {gold:1, silver:3, blonze:3},
//     }
//     sort.SliceStable(country, func(i, j int) bool { return country[i].blonze > country[j].blonze })
//     sort.SliceStable(country, func(i, j int) bool { return country[i].silver > country[j].silver })
//     sort.SliceStable(country, func(i, j int) bool { return country[i].gold > country[j].gold })
//     return country
// }


package main

import (
	"bufio"
	"container/heap"
	"fmt"
	"math"
	"os"
	"strconv"
)

const (
	initialBufSize = 10000
	maxBufSize     = 1000000
	mod            = 1e9 + 7
)

var (
	sc *bufio.Scanner = func() *bufio.Scanner {
		sc := bufio.NewScanner(os.Stdin)
		buf := make([]byte, initialBufSize)
		sc.Buffer(buf, maxBufSize)
		sc.Split(bufio.ScanWords)
		return sc
	}()
)

func main() {
	pos := getIntArray(5)
	k := getInt()

	if pos[4] - pos[0] <= k {
		fmt.Println("Yay!")
	} else {
		fmt.Println(":(")
	}
}

type Graph struct {
	n     int
	edges [][]int
}

func NewGraph(n int) *Graph {
	g := &Graph{
		n:     n,
		edges: make([][]int, n),
	}
	return g
}

func (g *Graph) AddEdge(u, v int) {
	g.edges[v] = append(g.edges[v], u)
	g.edges[u] = append(g.edges[u], v)
}

func dfs(c int, edges [][]int, visited map[int]struct{}) {
	visited[c] = struct{}{}

	for _, v := range edges[c] {
		_, flag := visited[v]
		if flag {
			continue
		}
		dfs(v, edges, visited)
	}
}

func bfs(c int, graph *Graph) {
	next := make([]int, 0)
	next = append(next, c)
	visited := make(map[int]struct{})

	for ; len(next) != 0; {
		u := next[0]
		next = next[1:]
		visited[u] = struct{}{}

		for _, v := range graph.edges[u] {
			_, flag := visited[v]
			if flag {
				continue
			}

			// なにか処理

			next = append(next, v)
		}
	}
}

func getInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func getIntArray(n int) []int {
	array := make([]int, n)
	for i := 0; i < n; i++ {
		array[i] = getInt()
	}
	return array
}

func getString() string {
	sc.Scan()
	return sc.Text()
}

func abs(a int) int {
	return int(math.Abs(float64(a)))
}

func pow(p, q int) int {
	return int(math.Pow(float64(p), float64(q)))
}

func powMod(n, p int) int {
	if p == 0 {
		return 1
	} else if p%2 == 0 {
		t := powMod(n, p/2)
		return calcMod(t * t)
	} else {
		return calcMod(n * powMod(n, p-1))
	}
}

func min(nums ...int) int {
	if len(nums) == 0 {
		panic("funciton min() requires at least one argument.")
	}
	res := nums[0]
	for i := 0; i < len(nums); i++ {
		res = int(math.Min(float64(res), float64(nums[i])))
	}
	return res
}

func max(nums ...int) int {
	if len(nums) == 0 {
		panic("funciton max() requires at least one argument.")
	}
	res := nums[0]
	for i := 0; i < len(nums); i++ {
		res = int(math.Max(float64(res), float64(nums[i])))
	}
	return res
}

func strSearch(a []string, b string) bool {
	for i := 0; i < len(a); i++ {
		if a[i] == b {
			return true
		}
	}
	return false
}

func printIntArray(array []int) {
	strArray := fmt.Sprint(array)
	fmt.Println(strArray[1 : len(strArray)-1])
}

func calcMod(x int) int {
	return x % mod
}

func reverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}

func isPrime(n int) bool {
	if n < 2 {
		return false
	} else if n == 2 {
		return true
	} else if n % 2 == 0 {
		return false
	}

	sqrtN := int(math.Sqrt(float64(n)))
	for i := 3; i <= sqrtN; i += 2 {
		if n % i == 0 {
			return false
		}
	}

	return true
}

func contains(s []int, e int) bool {
	for _, v := range s {
		if e == v {
			return true
		}
	}
	return false
}

func makeRange(min, max int) []int {
	a := make([]int, max-min+1)
	for i := range a {
		a[i] = min + i
	}
	return a
}

func powerset2(nums []int) [][]int {
	length := int(math.Pow(2, float64(len(nums))))
	result := make([][]int, length)

	index := 0
	result[index] = []int{}
	index++

	for _, n := range nums {
		max := index
		for i := 0; i < max; i++ {
			result[index] = copyAndAppend(result[i], n)
			index++
		}
	}

	return result
}

func copyAndAppend(nums []int, n int) []int {
	dst := make([]int, len(nums)+1)
	copy(dst, nums)
	dst[len(nums)] = n
	return dst
}

func calcGcd(x, y int) int {
	if y == 0 {
		return x
	} else if x >= y {
		return calcGcd(y, x % y)
	} else {
		return calcGcd(x, y % x)
	}
}

func getDivisor(n int) []int {
	var divisor []int
	divisor = append(divisor, 1)
	if n != 1 {
		divisor = append(divisor, n)
	}

	sqrt := int(math.Sqrt(float64(n)))
	for i := 2; i <= sqrt; i++ {
		if n % i == 0 {
			divisor = append(divisor, i)
			divisor = append(divisor, n/i)
		}
	}
	return divisor
}

type intHeap []int

func (h intHeap) Len() int {
	return len(h)
}

func (h intHeap) Less(i, j int) bool {
	return h[i] > h[j]
}

func (h intHeap) Swap(i, j int) {
	h[i], h[j] = h[j], h[i]
}

func (h *intHeap) Push(x interface{}) {
	*h = append(*h, x.(int))
}

func (h *intHeap) Pop() interface{} {
	old := *h
	n := len(old)
	x := old[n-1]
	*h = old[0 : n-1]
	return x
}

func initHeap() *intHeap {
	ih := &intHeap{}
	heap.Init(ih)
	return ih
}

func (h *intHeap) pushHeap(n int) {
	heap.Push(h, n)
}

func (h *intHeap) popHeap() int {
	return heap.Pop(h).(int)
}

func factMod(n int) int {
	value := 1
	for ; n > 1; n-- {
		value = calcMod(value * n)
	}
	return value
}

func combinationMod(n, k int) int {
	factN := factMod(n)
	factK := factMod(k)
	factNK := factMod(n - k)
	factKR := powMod(factK, mod - 2)
	factNKR := powMod(factNK, mod - 2)
	return calcMod(factN * calcMod(factKR * factNKR))
}


package main

import (
	"bufio"
	"container/heap"
	"fmt"
	"math"
	"os"
	"strconv"
)

const (
	initialBufSize = 10000
	maxBufSize     = 1000000
	mod            = 1e9 + 7
)

var (
	sc *bufio.Scanner = func() *bufio.Scanner {
		sc := bufio.NewScanner(os.Stdin)
		buf := make([]byte, initialBufSize)
		sc.Buffer(buf, maxBufSize)
		sc.Split(bufio.ScanWords)
		return sc
	}()
)

func main() {
	N := 5
	pos := getIntArray(N)
	k := getInt()

	result := "No"
	for i := 1; i < N; i++ {
		if abs(pos[i-1] - pos[i]) > k {
			result = "Yes"
			break
		}
	}
	fmt.Println(result)
}

type Graph struct {
	n     int
	edges [][]int
}

func NewGraph(n int) *Graph {
	g := &Graph{
		n:     n,
		edges: make([][]int, n),
	}
	return g
}

func (g *Graph) AddEdge(u, v int) {
	g.edges[v] = append(g.edges[v], u)
	g.edges[u] = append(g.edges[u], v)
}

func dfs(c int, edges [][]int, visited map[int]struct{}) {
	visited[c] = struct{}{}

	for _, v := range edges[c] {
		_, flag := visited[v]
		if flag {
			continue
		}
		dfs(v, edges, visited)
	}
}

func bfs(c int, graph *Graph) {
	next := make([]int, 0)
	next = append(next, c)
	visited := make(map[int]struct{})

	for ; len(next) != 0; {
		u := next[0]
		next = next[1:]
		visited[u] = struct{}{}

		for _, v := range graph.edges[u] {
			_, flag := visited[v]
			if flag {
				continue
			}

			// なにか処理

			next = append(next, v)
		}
	}
}

func getInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func getIntArray(n int) []int {
	array := make([]int, n)
	for i := 0; i < n; i++ {
		array[i] = getInt()
	}
	return array
}

func getString() string {
	sc.Scan()
	return sc.Text()
}

func abs(a int) int {
	return int(math.Abs(float64(a)))
}

func pow(p, q int) int {
	return int(math.Pow(float64(p), float64(q)))
}

func powMod(n, p int) int {
	if p == 0 {
		return 1
	} else if p%2 == 0 {
		t := powMod(n, p/2)
		return calcMod(t * t)
	} else {
		return calcMod(n * powMod(n, p-1))
	}
}

func min(nums ...int) int {
	if len(nums) == 0 {
		panic("funciton min() requires at least one argument.")
	}
	res := nums[0]
	for i := 0; i < len(nums); i++ {
		res = int(math.Min(float64(res), float64(nums[i])))
	}
	return res
}

func max(nums ...int) int {
	if len(nums) == 0 {
		panic("funciton max() requires at least one argument.")
	}
	res := nums[0]
	for i := 0; i < len(nums); i++ {
		res = int(math.Max(float64(res), float64(nums[i])))
	}
	return res
}

func strSearch(a []string, b string) bool {
	for i := 0; i < len(a); i++ {
		if a[i] == b {
			return true
		}
	}
	return false
}

func printIntArray(array []int) {
	strArray := fmt.Sprint(array)
	fmt.Println(strArray[1 : len(strArray)-1])
}

func calcMod(x int) int {
	return x % mod
}

func reverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}

func isPrime(n int) bool {
	if n < 2 {
		return false
	} else if n == 2 {
		return true
	} else if n % 2 == 0 {
		return false
	}

	sqrtN := int(math.Sqrt(float64(n)))
	for i := 3; i <= sqrtN; i += 2 {
		if n % i == 0 {
			return false
		}
	}

	return true
}

func contains(s []int, e int) bool {
	for _, v := range s {
		if e == v {
			return true
		}
	}
	return false
}

func makeRange(min, max int) []int {
	a := make([]int, max-min+1)
	for i := range a {
		a[i] = min + i
	}
	return a
}

func powerset2(nums []int) [][]int {
	length := int(math.Pow(2, float64(len(nums))))
	result := make([][]int, length)

	index := 0
	result[index] = []int{}
	index++

	for _, n := range nums {
		max := index
		for i := 0; i < max; i++ {
			result[index] = copyAndAppend(result[i], n)
			index++
		}
	}

	return result
}

func copyAndAppend(nums []int, n int) []int {
	dst := make([]int, len(nums)+1)
	copy(dst, nums)
	dst[len(nums)] = n
	return dst
}

func calcGcd(x, y int) int {
	if y == 0 {
		return x
	} else if x >= y {
		return calcGcd(y, x % y)
	} else {
		return calcGcd(x, y % x)
	}
}

func getDivisor(n int) []int {
	var divisor []int
	divisor = append(divisor, 1)
	if n != 1 {
		divisor = append(divisor, n)
	}

	sqrt := int(math.Sqrt(float64(n)))
	for i := 2; i <= sqrt; i++ {
		if n % i == 0 {
			divisor = append(divisor, i)
			divisor = append(divisor, n/i)
		}
	}
	return divisor
}

type intHeap []int

func (h intHeap) Len() int {
	return len(h)
}

func (h intHeap) Less(i, j int) bool {
	return h[i] > h[j]
}

func (h intHeap) Swap(i, j int) {
	h[i], h[j] = h[j], h[i]
}

func (h *intHeap) Push(x interface{}) {
	*h = append(*h, x.(int))
}

func (h *intHeap) Pop() interface{} {
	old := *h
	n := len(old)
	x := old[n-1]
	*h = old[0 : n-1]
	return x
}

func initHeap() *intHeap {
	ih := &intHeap{}
	heap.Init(ih)
	return ih
}

func (h *intHeap) pushHeap(n int) {
	heap.Push(h, n)
}

func (h *intHeap) popHeap() int {
	return heap.Pop(h).(int)
}

func factMod(n int) int {
	value := 1
	for ; n > 1; n-- {
		value = calcMod(value * n)
	}
	return value
}

func combinationMod(n, k int) int {
	factN := factMod(n)
	factK := factMod(k)
	factNK := factMod(n - k)
	factKR := powMod(factK, mod - 2)
	factNKR := powMod(factNK, mod - 2)
	return calcMod(factN * calcMod(factKR * factNKR))
}


package main

import (
	"fmt"
)

func main() {
	// var a, b, c, d, e int
	// fmt.Scan(&a, &b, &c, &d, &e)
	ts := make([]int, 6)
	for i := 0; i < 6; i++ {
		fmt.Scan(&ts[i])
	}

	if ts[4]-ts[0] >= ts[5] {
		fmt.Print("Yay!")
	} else {
		fmt.Print(":(")
	}
}


package main

import (
	"fmt"
)

func main() {
	var a,b,c,d,e,k int
	fmt.Scan(&a,&b,&c,&d,&e,&k)

	if b - a >= k {
		fmt.Println(":(")
	} else if c - a >= k {
		fmt.Println(":(")
	} else if d - a >= k {
		fmt.Println(":(")
	} else if e - a >= k {
		fmt.Println(":(")
	} else if c - b >= k {
		fmt.Println(":(")
	} else if d - b >= k {
		fmt.Println(":(")
	} else if e - b >= k {
		fmt.Println(":(")
	} else if d - c >= k {
		fmt.Println(":(")
	} else if e - c >= k {
		fmt.Println(":(")
	} else if e - d >= k {
		fmt.Println(":(")
	} else {
		fmt.Println("Yay!")
	}
}


*a,k=$<.map &:to_i;puts a[-1]-a[0]>k ? ':(' : 'Yay!'


a = gets.to_i
b = gets.to_i
c = gets.to_i
d = gets.to_i
e = gets.to_i
k = gets.to_i

if e-a<=k
  puts "Yay!"
else
  puts ":("
end


a = gets.chomp.to_i
b = gets.chomp.to_i
c = gets.chomp.to_i
d = gets.chomp.to_i
e = gets.chomp.to_i
k = gets.chomp.to_i

array = [a, b, c, d, e]
array.each_with_index do |v, x|
  x = x+1
  x.upto(4) do |i|
    if array[i] - v > k
      puts ":("
      exit
    end
  end
end
puts "Yay!"


a=gets.to_i
gets
gets
gets
e=gets.to_i
k=gets.to_i
puts e-a <=k ? :Yes: :No


a = gets.to_i
b = gets.to_i
c = gets.to_i
d = gets.to_i
e = gets.to_i
k = gets.to_i

if (b-a < k) && (c-a < k) && (d-a < k) && (e-a < k) && (c-b < k) && (d-b < k) && (e-b < k) && (d-c < k) && (e-c < k) && (e-d < k)
  puts "Yay!"
else
  puts ":("
end


a = gets.to_i
b = gets.to_i
c = gets.to_i
d = gets.to_i
e = gets.to_i
k = gets.to_i

if e-a < k
  puts ":("
else
  puts "Yay!"
end


#![allow(dead_code, unused_variables, unused_macros, unused_imports)]

// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input { (source = $s:expr, $($r:tt)*) => { let mut iter = $s.split_whitespace(); let mut next = || { iter.next().unwrap() }; input_inner!{next, $($r)*} }; ($($r:tt)*) => { let stdin = std::io::stdin(); let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock())); let mut next = move || -> String{ bytes .by_ref() .map(|r|r.unwrap() as char) .skip_while(|c|c.is_whitespace()) .take_while(|c|!c.is_whitespace()) .collect() }; input_inner!{next, $($r)*} }; }
macro_rules! input_inner { ($next:expr) => {}; ($next:expr, ) => {}; ($next:expr, $var:ident : $t:tt $($r:tt)*) => { let $var = read_value!($next, $t); input_inner!{$next $($r)*} }; ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => { let mut $var = read_value!($next, $t); input_inner!{$next $($r)*} }; }
macro_rules! read_value { ($next:expr, ( $($t:tt),* )) => { ( $(read_value!($next, $t)),* ) }; ($next:expr, [ $t:tt ; $len:expr ]) => { (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>() }; ($next:expr, chars) => { read_value!($next, String).chars().collect::<Vec<char>>() }; ($next:expr, usize1) => { read_value!($next, usize) - 1 }; ($next:expr, $t:ty) => { $next().parse::<$t>().expect("Parse error") }; }

fn main() {
    input! {
        a: [i32; 5],
        k: i32,
    }

    if a[4] - a[0] > k {
        println!(":(");
    } else {
        println!("Yay!");
    }
}


use std::io;

fn procon_read<T: std::str::FromStr>() ->  Vec<T> {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let iter = buf.split_whitespace();
	let mut v: Vec<T> = Vec::new();
	for i in iter {
		v.push(i.parse().ok().unwrap());
	}
	v
}

fn main() {
	let mut ant:Vec<i32> = Vec::new();
	let v:Vec<i32> = procon_read();
	ant.push(v[0]);
	let v:Vec<i32> = procon_read();
	ant.push(v[0]);
	let v:Vec<i32> = procon_read();
	ant.push(v[0]);
	let v:Vec<i32> = procon_read();
	ant.push(v[0]);
	let v:Vec<i32> = procon_read();
	ant.push(v[0]);
	let v:Vec<i32> = procon_read();
	let k:i32 = v[0];
	let mut flag = false;
	for i in 0..5 {
		for j in (i+1)..5 {
			if ant[j] - ant[i] > k{
				flag = true;
				break;
			}
		}
		if flag {
			break;
		}
	}
	if flag {
		println!(":(");
	}else{
		println!("Yay!");
	}
}


fn main() {
    let a = read::<usize>();
    let b = read::<usize>();
    let c = read::<usize>();
    let d = read::<usize>();
    let e = read::<usize>();
    let v = [a, b, c, d, e];
    let k = read::<usize>();
    for i in 0..4 {
        for j in (i+1)..5 {
            if v[j] - v[i] > k {
                println!(":(");
                return;
            }
        }
    }
    println!("Yay!");
}

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().parse().ok().unwrap()
}


#![allow(unused_imports)]

use text_io::*;
use proconio::*;
use std::collections::*;
use std::process::exit;
use std::cmp::*;
use itertools::Itertools;

fn main() {
    input! {
    a:usize,
    b:usize,
    c:usize,
    d:usize,
    e:usize,
    k:usize,
    }
    if max(a,max(b,max(c,max(d,e))))>k {println!(":(")}
    else { println!("Yay!") }
}


#[allow(unused_imports)]
use std::io::Write;

#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($e:expr),*) => {
        #[cfg(debug_assertions)]
        $({
            let (e, mut err) = (stringify!($e), std::io::stderr());
            writeln!(err, "{} = {:?}", e, $e).unwrap()
        })*
    };
}

#[allow(non_snake_case)]
fn main() {
    input![A: [i32; 6]];

    let m = A.iter().min().unwrap();
    let M = A.iter().max().unwrap();
    println!("{}", if M - m <= 15 { "Yay!" } else { ":(" });
}


#![allow(unused_imports)]
use proconio::{input, fastout};
use proconio::marker::*;

#[fastout]
fn main() {
    input! {
    n: usize,
    c: [usize; 5]
    }
    let m = c.iter().min().unwrap();
    let ans: usize = 5 + n / m - if n % m == 0 {1} else {0};
    println!("{}", ans);
}


var input: [Int] = []
(0..<5).forEach{_ in input.append(Int(readLine()!)!)}
print(input[4]-input[0] > Int(readLine()!)! ? ":(" : "Yay!")


var a:[Int]=[];(0..<6).forEach{_ in a.append(Int(readLine()!)!)};print(a[4]-a[0]>a[5] ?":(":"Yay!")


var input: [Int] = []
for _ in 0..<6 {
  let line = readLine()!
  input.append(Int(line)!)
}

let a = input[0]
let e = input[4]
let k = input[5]

if e - a <= k {
  print("Yay!")
} else {
  print(":(")
}


import Foundation

class City {

    private let delay: Int
    private let initial: Int
    private let output: Int
    private let prev: City?

    init(delay: Int, initial: Int, output: Int, prev: City?) {
        self.delay = delay
        self.initial = initial
        self.output = output
        self.prev = prev
    }

    func total() -> Int {
        return prev?.total() ?? initial
    }

    func outputPerMin() -> Int {
        if let prev = prev {
            return min(prev.outputPerMin(), output)
        } else {
            return output
        }
    }

    func outputTimes() -> Int {
        return Int(ceil(Double(total()) / Double(outputPerMin())))
    }

    func totalTime() -> Int {
        return delay + outputTimes()
    }
}

let N = Int(readLine()!)!

var cities: [City] = []
var prev: City?
for i in 0 ..< 5 {
    let output = Int(readLine()!)!
    let city = City(
        delay: i,
        initial: i == 0 ? N : 0,
        output: output,
        prev: prev)
    cities.append(city)
    prev = city
}

let answer = cities.last!.totalTime()

print(answer)


var a:[Int]=[];(0..<6).forEach{_ in a+=Int(readLine()!)!};print(a[4]-a[0]>a[5] ?":(":"Yay!")


var input: [Int] = []
(0..<5).forEach{input.append(Int(readLine()!)!)}
print(input[4]-input[0] > Int(readLine()!)! ? ":(" : "Yay!")


import { readFileSync } from 'fs'

function main(input: string) {
  const lines = input.split('\n').map(Number)
  const antennas = lines.slice(0, 5)
  const k = lines[5]

  const max = Math.max(...lines)
  const min = Math.min(...lines)

  console.log((max - min) <= k ? 'Yay!' : ':(')
}

main(readFileSync('/dev/stdin', 'utf8').trim())


const solve = (input) => {
  const is = input.split("\n").map(Number)
  const m = is[4] - is[0]
  return is[5] >= m ? "Yay!" : ":("
}

if (process.env.NODE_ENV === "test") {
  // module.exports = (input) => solve(input.trim())
} else {
  const input = require("fs").readFileSync("/dev/stdin", "utf8")
  console.log(solve(input.trim()))
}


export class Main {
  static main(input): string {
    const [a, b, c, d, e, k]: number[] = input.split("\n").map(s => Number(s.split(" ")[0]));
    const l: number[] = [a, b, c, d, e];
    for (let i = 0; i < 4; i++) {
      for (let j = i + 1; j < 5; j++) {
        if (l[j] - l[i] > k) {
          return ":(";
        }
      }
    }
    return "Yay!";
  }
}
console.log(Main.main(require("fs").readFileSync("/dev/stdin", "utf8")));


((input: string): void => {
    const hoge: number[] = input.split(/\n/).map(Number)
    const fuga = Math.abs(hoge[0]-hoge.slice(-2)[0]);
    console.log(fuga > hoge.slice(-1)[0] ? ':(' : 'Yay!');
})(require('fs').readFileSync('/dev/stdin', 'utf8'));


import * as fs from 'fs';

const main = (input: string) => {
  const lines = input.split("\n").map(str => parseInt(str));
  let sum = 0;
  let maxTime = 0;
  let w: number[] = [];

  lines.forEach((time) => {
    if (time % 10 !== 0) {
      w.push(10 - time % 10)
    }

    sum += (Math.ceil(time / 10) * 10)
  });

  if (w !== []) {
    maxTime = w.reduce((a, b) => Math.max(a, b))
  }

  console.log(sum - maxTime);
};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());


a, b = map(int, input().split())

print(max(a + b, a - b, a * b))


a,b=map(int,input().split())
print(max(a+b,a*b,a-b))


a, b = map(int, input().split())

m = a+b
if m<a*b:
    m = a*b
if m<a-b:
    m=a-b
print(m)


A,B=map(int,input().split())
if (A+B)>(A-B) and (A+B)>(A*B):
  print(A+B)
elif (A-B)>(A+B) and (A-B)>(A*B):
  print(A-B)
elif (A*B)>(A+B) and (A*B)>(A-B):
  print(A*B)


map(int,input().split())
print(max(A+B,A-B,A*B))


A, B = map(int, input(), split())

x = A + B
y = A - B
z = A * B
print(max(x, y, z))


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] ab = br.readLine().split(" ");
        int a = Integer.parseInt(ab[0]);
        int b = Integer.parseInt(ab[1]);
        System.out.println(problem137a(a, b));
    }

    private static int problem137a(int a, int b) {
        return Math.max(Math.max((a + b), (a - b)), (a * b));
    }
}


import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve(args);
    }

    public void solve(String[] args) {
        MyScanner scanner = new MyScanner();
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        int sum = a + b;
        int minus = a - b;
        int kake = a * b;

        int ans = Math.max(kake, Math.max(sum, minus));

        System.out.println(ans);
    }

    private static long gcd(long m, long n) {
        if(m < n) return gcd(n, m);
        if(n == 0) return m;
        return gcd(n, m % n);
    }

    private static long lcm(long m, long n) {
        return m * n / gcd(m, n);
    }

    private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        }
        public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
    }
}


import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;
import java.lang.Math;

public class Main {
	public static void main(String[] args) {
		FS reader = new FS();
		// write reader
		int A = reader.nextInt();
		int B = reader.nextInt();
		solver(A, B);
	}

	public static void solver(int A, int B) {
		// write logic
		System.out.println(Math.max(Math.max(A+B, A-B), A*B));
	}

	// Read Class
	static class FS {
		private final InputStream in = System.in;
		private final byte[] buffer = new byte[1024];
		private int ptr = 0;
		private int buflen = 0;
		private boolean hasNextByte() {
			if (ptr < buflen) {
				return true;
			} else {
				ptr = 0;
				try {
					buflen = in.read(buffer);
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (buflen <= 0) {
					return false;
				}
			}
			return true;
		}

		private int readByte() { return hasNextByte() ? buffer[ptr++] : -1;}
		private boolean isPrintableChar(int c) {return 33 <= c && c <= 126;}
		private void skipUnprintable() {while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}

		public boolean hasNext() { skipUnprintable(); return hasNextByte();}
		public String next() {
			if (!hasNext()) throw new NoSuchElementException();
			StringBuilder sb = new StringBuilder();
			int b = readByte();
			while(isPrintableChar(b)) {
				sb.appendCodePoint(b);
				b = readByte();
			}
			return sb.toString();
		}
		public int nextInt() {
			return (int)nextLong();
		}
		public long nextLong() {
			if (!hasNext()) throw new NoSuchElementException();
			long n = 0;
			boolean minus = false;
			int b = readByte();
			if (b == '-') {
				minus = true;
				b = readByte();
			}
			if (b < '0' || '9' < b) {
				throw new NumberFormatException();
			}
			while(true) {
				if ('0' <= b && b <= '9') {
					n *= 10;
					n += b - '0';
				} else if(b == -1 || !isPrintableChar(b)) {
					return minus ? -n : n;
				} else {
					throw new NumberFormatException();
				}
				b = readByte();
			}
		}
	}
}


import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int A = stdIn.nextInt();
		int B = stdIn.nextInt();
		int ans1 = 0, ans2 = 0, ans3 = 0;
		int ans = 0;
		ans1 = A + B;
		ans2 = A - B;
		ans3 = A * B;
		if(ans1 > ans2){
			if(ans1 > ans3){
				ans = ans1;
			}
		}
		if(ans2 > ans1){
			if(ans2 > ans3){
				ans = ans2;
			}
		}
		if(ans3 > ans1){
			if(ans3 > ans2){
				ans = ans3;
			}
		}
		System.out.println(ans);
		stdIn.close();
	}
}


import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int A = stdIn.nextInt();
		int B = stdIn.nextInt();
		int ans1 = 0, ans2 = 0, ans3 = 0;

		ans1 = A + B;
		ans2 = A - B;
		ans3 = A * B;
		if(ans1 > ans2){
			if(ans1 > ans3){
				System.out.println(ans1);
			}
		}
		if(ans2 > ans1){
			if(ans2 > ans3){
				System.out.println(ans2);
			}
		}
		if(ans3 > ans1){
			if(ans3 > ans2){
				System.out.println(ans3);
			}
		}
		stdIn.close();
	}
}


import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
		ArrayList<String> one = nextIntArray();
		int A = one.get(0);
		int B = one.get(1);
		int output = Math.max(A + B, Math.max(A - B, A * B));
		myout(output);
	}
	//Method addition frame start

	//Method addition frame end
}


#include <cstdio>
#include <algorithm>
int main() {
  int a, b;
  scanf("%d%d", &a, &b);
  printf("%d", std::max(std::max(a + b, a - b), a * b));
}


#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<stdint.h>
#include<malloc.h>
#include<math.h>
#include<x86intrin.h>

int my_gets(char *buf,int nBuf,FILE *fp){
    int ch;

    while(--nBuf >0){
        ch=getc(fp);
        if(ch==EOF || ch=='\n')
            break;
        *(buf++)=(char)ch;
    }
    *(buf)='\0';

    return nBuf;
}

void InputIntAry(int *a,int nDigit,int N){      //nDigitは想定される最大桁数
    char *buf,*ptr;

    buf=(char*)malloc( (N*(nDigit+2)) * sizeof(char) );
    my_gets(buf,N*(nDigit+2),stdin);

    ptr=strtok(buf," ");
    while(ptr!=NULL && N-->0){
        *(a++)=atoi(ptr);
        ptr=strtok(NULL," ");
    }
    free(buf);
}

int CmpInt(const void *a, const void *b){        //b-aを返す(qsortなら4321)
    return *((int*)b)- *((int*)a);
}

typedef struct{
    int A,B;
} JobInfo_t;

int CmpJob(const void *p1, const void *p2){
    JobInfo_t Job1=*(JobInfo_t*)p1, Job2=*(JobInfo_t*)p2;

    if(Job1.A == Job2.A){
        return Job2.B - Job1.B;
    }
    else{
        return Job1.A - Job2.A;
    }
}

#define MAX_OF(a,b) (((a)>(b))?(a):(b))

int main(){
    int A,B;

    scanf("%d %d",&A,&B);
    printf("%d\n", MAX_OF(A+B,MAX_OF(A*B,A-B)));

    return 0;
}

/*int main(){
    int N,M;
    JobInfo_t Job[100000];

    scanf("%d %d%*c", &N, &M);
    for(int i=0;i<N;i++){
        scanf("%d %d%*c", &(Job[i].A), &(Job[i].B));
    }
    qsort(Job, N, sizeof(JobInfo_t), CmpJob);

    int allowed=0,max;
    for(int i=0;i<N;i++){

    }
    return 0;
} */


#include <stdio.h>
#include <stdlib.h>

int main() {
	int a,b;
	scanf("%d %d", &a, &b);
	int m = a+b;
	if (m < a-b) m = a-b;
	if (m < a*b) m = a*b;
	printf("%d", m);
	return 0;
}


#include<iostream>
using namespace std;
int main()
{
  int a,b;
  cin>>a>>b;
  if(a+b>=a*b&&a+b>=a-b){
    cout<<a+b;
  }
  else if(a-b>=a+B&&a-b>=a*b){
    cout<<a-b;
  }
  else if(a*b>=a+b&&a*b>=a-b){
    cout<<a*b;
  }
}


#include<iostream>
int main(){
  int a,b;
  std::cin>>a>>b;
  std::cout<<std::max({a*b,a+b,a-b});
}


#pragma GCC optimize("O3")

#define _GLIBCXX_DEBUG
#include <iostream>
#include <vector>
#include <string>
#include <string_view>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
using namespace std;

/*----------macros----------*/

//output================
#define endl '\n'
#define fcout(a) cout << fixed << setprecision((int)(a))

//typedef===============
typedef long long       ll;
typedef long double     ld;
typedef pair<int, int>  Pii;
typedef pair<ll, ll>    Pll;

//const number==========
constexpr ll INF9   = (ll)1e9 + 1;
constexpr ll INF18  = (ll)1e18 + 1;
constexpr ll MOD    = 1000000007;
constexpr ll MOD2   = 998244353;
constexpr ld PI     = 3.141592653589793L;

//member================
#define pb push_back
#define eb emplace_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second

//others================
#define all(x)          (x).begin(), (x).end()
#define rall(x)         (x).rbegin(), (x).rend()
#define rep(i, n)       for(int i = 0; (i) < (n); ++(i))
#define reps(i, n)      for(int i = 1; (i) <= (n); ++(i))
#define rrep(i, n)      for(int i = n - 1; (i) >= 0 ; --(i))
#define repbit(bit, n)  for(int bit = 0; (bit) < (1 << (n)); ++(bit))
#define ifbit(bit, i)   if((bit) & (1 << (i)))
#define CtoI(c)         int((c)) - int('0')
#define ItoC(c)         char((c) + '0')

//functions=============
template<typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }

template<typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }

//vector<int> dx = {1, 0, -1, 0}, dy = {0, 1, 0, -1};
//vector<int> dx2 = { 1,1,0,-1,-1,-1,0,1 }, dy2 = { 0,1,1,1,0,-1,-1,-1 };

/*--------additional--------*/

/*----------main------------*/

int main() {
/*----------fastio----------*/
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);
    std::ios::sync_with_stdio(false);
/*----------solve-----------*/

    int a, b; cin >> a, b;
    cout << max(a + b, max(a - b, a * b)) << endl;

return 0;
}


#include <stdio.h>
int main(void){
    int a,b, ans;
    scanf("%d %d", &a, &b);
    int p = a + b;
    int m = a - b;
    int k = a * b;
    if (m > p) {
        if (m > k) {
            ans = m;
        } else {
            ans = k;
        }
    } else {
        if (p > k) {
            ans = p;
        } else {
            ans = k;
        }
    }
    printf("%d", ans);
    return 0;
}


#include<stdio.h>

int main(void){
    int A,B;
    int a[3],max;
    scanf("%d %d",&A,&B);
    a[0] = A+B;
    a[1] = A-B;
    a[2] = A*B;
    max = a[0];
    for(int i=0;i<3;i++){
        if(max < a[i]) max = a[i];
    }
    printf("%d",max);
    return 0;
}


#include <stdio.h>

int main (void) {
    int a, b;
    scanf("%d%d", &a, &b);

    if ( a + b > a - b  ) {
        if ( a + b > a * b ) {
            printf("%d\n", a + b);
        }
        else {
            printf("%d\n", a * b);
        }
    }
    else {
        if ( a - b > a * b ) {
            printf("%d\n", a - b);
        }
        else {
            printf("%d\n", a * b);
        }
    }
    return 0;
}


#include<stdio.h>
#include<string.h>

int main()
{
   int k,x; //x is black //k is number
   scanf("%d %d",&k,&x)
   for(int i=x-k+1;i<=x+k-1;i++){
		printf("%d ",i);
	}
}


#include <stdio.h>
int main(){
int a,b,c,d,e,max=-1000;
scanf ("%d%d",&a,&b);
c=a+b;
d=a-b;
e=a*b;
if (max<c){
max=c;
}
if (max<d){
max=d;
}
if (max<e){
max=e;
}
printf("%d",max)
return 0;
}


#include<stdio.h>
int main()
{
    int a,b,sum,mul,subs,arr[3];
    while(scanf("%d%d",&a,&b)==2)
    {
        sum=a+b;
        subs=a-b;
        mul=a*b;

        if(sum>=subs&&sum>=mul)
            printf("sum\n");
        else if(subs>=sum&&subs>=mul)
            printf("subs\n");
        else
            printf("mul\n");
    }
    return 0;
}


function main(input) {
  const args = input.split(' ');
  const a = parseInt(args[0], 10);
  const b = parseInt(args[1], 10);

  var max = a + b;
  if(max < a - b) {
    max = a - b;
  }
  if(max < a * b) {
    max = a * b;
  }
  console.log(max)

}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


'use strict';(function(input){

  input=input.trim().split(/\s+/).map(x=>x-0);
  const A=input[0],
        B=input[1];
  console.log(Math.max(A+B,A-B,A*B));
})(require('fs').readFileSync('/dev/stdin','utf8'));


function Main(input) {
    input = input.trim()
  input = input.split(" ").map(Number);
  console.log(Math.max(input[0]+input[1],input[0]-input[1],input[0]*input[1]))
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input) {
  input = input.split(" ");
  var k = Number(input[0]);
  var x = Number(input[1]);
  var floor = x-k+1;
  var ceiling = x+k-1;
  var output = "";

  if(floor<-10000){
    floor=-10000;
  }

  if(ceiling>10000){
    ceiling=10000;
  }

  for(var i = floor ; i<= ceiling ; i++){
    output = output + String(i) + " ";
  }

  output = output.trim();

  console.log(output);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input) {
  input = input.split(" ");
  var a = input[0];
  var b = input[1];
  console.log(Math.max(a+b,a-b,a*b));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input) {
  input = input.split(" ");
  var a = input[0];
  var b = input[1];
  console.log(math.max(a+b,a-b,a*b));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


package main

import (
  "fmt"
)

func maxInt(a ...int) int {m := a[0]; for _, x := range a {if x > m {m = x}}; return m}
func minInt(a ...int) int {m := a[0]; for _, x := range a {if x < m {m = x}}; return m}

func main() {
  var a, b int
  fmt.Scan(&a, &b)
  fmt.Println(maxInt(a+b, a-b, a*b))
}


package main

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

const (
	defaultBufferSize = 1024
	maxBufferSize     = 1e6
	Mod               = 1e9 + 7
)

var sc = bufio.NewScanner(os.Stdin)

// sc.Buffer(make([]byte, defaultBufferSize), maxBufferSize)

func readInt() int {
	sc.Scan()
	i, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return i
}

func readString() string {
	sc.Scan()
	return sc.Text()
}

func readInt64() int64 {
	sc.Scan()
	i, err := strconv.ParseInt(sc.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return int64(i)
}

func readfloat64() float64 {
	sc.Scan()
	f, err := strconv.ParseFloat(sc.Text(), 64)
	if err != nil {
		panic(err)
	}
	return f
}

func abs(a int) int {
	if a < 0 {
		return a * -1
	}
	return a
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func gcd(x, y int) int {
	if y == 0 {
		return x
	}
	return gcd(y, x%y)
}

func ModComb(n, k int) int {
	if k == 0 {
		return 1
	}
	x, y := n, k
	for i := 1; i < k; i++ {
		x = x * (n - i) % Mod
		y = y * (k - i) % Mod
	}
	inv := ModInv(y)
	return x * inv % Mod
}

func ModFact(x int) int {
	fact := 1
	for i := 1; i <= x; i++ {
		fact = fact * i % Mod
	}
	return fact
}

func ModInv(x int) int {
	return ModPow(x, Mod-2)
}

func ModPow(a, n int) int {
	res := 1
	for n > 0 {
		if n%2 != 0 {
			res = res * a % Mod
		}
		a = a * a % Mod
		n /= 2
	}
	return res
}

func pow(a, n int) int {
	if n == 0 {
		return 1
	}

	ans := 0
	if n%2 == 0 {
		ans = pow(a*a, n/2)
	} else {
		ans = a * pow(a*a, (n-1)/2)
	}
	return ans
}

func intSliceReverse(slice []int) []int {
	for i, j := 0, len(slice)-1; i < j; i, j = i+1, j-1 {
		slice[i], slice[j] = slice[j], slice[i]
	}
	return slice
}

func stringReverse(str string) string {
	runes := []rune(str)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}

func primeFactorization(x int) map[int]int {
	result := make(map[int]int, 0)
	for i := 2; i*i <= x; i++ {
		for x%i == 0 {
			result[i]++
			x /= i
		}
	}
	if x != 1 {
		result[x]++
	}
	return result
}

func isPrime(x int) bool {
	if x == 1 {
		return false
	}
	for i := 2; i*i <= x; i++ {
		if i == x {
			continue
		}
		if x%i == 0 {
			return false
		}
	}
	return true
}

func main() {
	sc.Split(bufio.ScanWords)
	a, b := readInt(), readInt()

	ans := -201
	ans = max(ans, a+b)
	ans = max(ans, a-b)
	ans = max(ans, a*b)
	fmt.Println(ans)
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}


package main

import "fmt"

func main() {
	var a, b int
	fmt.Scanf("%d %d", &a, &b)

	max := a + b
	if a-b > max {
		max = a - b
	}
	if a*b > max {
		max = a * b
	}

	fmt.Println(max)
}


package main

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

func main() {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)

	sc.Scan()
	a, _ := strconv.Atoi(sc.Text())

	sc.Scan()
	b, _ := strconv.Atoi(sc.Text())

	l := []int{a + b, a - b, a * b}
	sort.Slice(l, func(i, j int) bool {
		return l[i] < l[j]
	})

	sort.Ints(l)

	fmt.Println(l[2])
}


package main

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

func main() {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)

	sc.Scan()
	a, _ := strconv.Atoi(sc.Text())

	sc.Scan()
	b, _ := strconv.Atoi(sc.Text())

	l := []int{a + b, a - b, a * b}
	sort.Slice(l, func(i, j int) bool {
		return l[i] < l[j]
	})

	fmt.Println(l[2])
}


// by https://atcoder.jp/contests/abc070/tasks/abc070_c
package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	var headTmp = nextLine()
	// fmt.Println(headTmp)
	var head = strings.Split(headTmp, " ")
	// fmt.Println(head)

	var N int
	var M int
	N, _ = strconv.Atoi(head[0])
	M, _ = strconv.Atoi(head[1])
	var A []int
	var B []int
	// var BB []int
	for i := 0; i < N; i++ {
		var bodyTmp = nextLine()
		// fmt.Println(bodyTmp)

		var body = strings.Split(bodyTmp, " ")
		var a, _ = strconv.Atoi(body[0])
		var b, _ = strconv.Atoi(body[1])
		A = append(A, a)
		B = append(B, b)
		// i=1~Mまでaがiより小さいか確かめる
		// １より小さいならばbを取得
		// その中で一番大きいbを取得
	}
	// fmt.Println(B)
	// sort.Sort(sort.Reverse(sort.IntSlice(B)))
	// fmt.Println(B)
	// var resA []int
	// var resB []int
	var totalMoney int

	for j := 1; j < M+1; j++ {
		// fmt.Println("j", j)

		var maxIndex int
		var maxB int

		for i := 0; i < N; i++ {
			// fmt.Println("i", i)

			// j日後より短い中で
			if A[i] <= j {
				//　価値が最大の仕事を探す
				if B[i] > maxB {
					maxIndex = i
					// fmt.Println("maxIndex", maxIndex)

					maxB = B[i]
					// fmt.Println("maxB", maxB)
				}
				// var bb = B[i]
				// BB = append(BB, bb)
			}

		}
		// resA = append(resA, A[maxIndex])
		// resB = append(resB, maxB)

		if maxB > 0 {
			totalMoney += maxB

			B[maxIndex] = 0
			// fmt.Println("maxIndex", maxIndex)

			// fmt.Println("B", B)
		}

		// A[maxIndex] = 0
		// fmt.Println("A[maxIndex]", A[maxIndex])

		// A = delete(A, maxIndex)
		// B = delete(B, maxIndex)
		//N--
		// fmt.Println(M)
		// fmt.Println("B:", B)
		// // sort.Sort(sort.Reverse(sort.IntSlice(B)))
		// // fmt.Println("sort:", B)
		// fmt.Println("BB:", BB)
		// fmt.Println("max=", maxInt(BB))

		// B = B[1:]
		// B = append(B, 0)

		// fmt.Println("B:", B)
		// BB = nil

		// fmt.Println("A:", A)
		// fmt.Println("s:", delete(A, 0))
		// fmt.Println(totalMoney)

	}
	// fmt.Println("A:", resA)
	// fmt.Println("B:", resB)
	fmt.Println(totalMoney)

	// fmt.Println("A:", A[0])
	// fmt.Println("B:", B)

	// fmt.Println("N:", N)
	// fmt.Println("M:", M)
}

func delete(s []int, i int) []int {
	x := append(s[:i], s[i+1:]...)
	return x
}

func maxInt(a []int) int {
	sort.Sort(sort.IntSlice(a))
	return a[len(a)-1]
}

func nextLine() string {
	sc.Scan()
	return sc.Text()
}


A, B = gets.split(" ").map(&:to_i)
# S = gets.chomp
# N = gets.to_i

puts [A+B, A-B, A*B].max


a, b = gets.split.map(&:to_i)

puts [a+b, a-b, a*b].max


a, b = gets.split.map(&:to_i)
answers = []
answers << a + b
answers << a - b
answers << a * b
puts answers.max


a,b = gets.split.map(&:to_i)

i=a+b
j=a-b
k=a*b

if i > j && i> k then
    puts(i)
elsif j > i && j > k then
    puts(j)
else
    puts(k)
end


a, b = gets.split.map(&:to_i)

i = a+b
j = a-b
k = a*b

if i>j && i>k
    puts i
elsif j>i && j>k
    puts j
else
    puts k
end


A = gets.to_i
B = gets.to_i

puts [A + B, A - B, A * B].max


#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

fn f(s: &[char]) -> bool {
    let m = s.len();
    for i in 0..m {
        if s[i] != s[m - 1 - i] {
            return false;
        }
    }
    true
}

use std::iter::Iterator;
use std::cmp;

fn main() {
    input! {
        a : i32,
        b : i32,
    }

    let t = cmp::max(a + b, a -b);
    let tt = cmp::max(t, a * b);

    println!("{}", tt);

}


use std::io;

fn main () {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let mut iter = buf.split_whitespace();
	let a:i32 = match iter.next().unwrap().parse() {
		Ok(n) => n,
		_ => panic!(""),
	};
	let b:i32 = match iter.next().unwrap().parse() {
		Ok(n) => n,
		_ => panic!(""),
	};
	let ar = [a+b, a-b, a*b];
	println!("{}", ar.iter().max().unwrap());
}


/* {{{ */
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};
    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };
    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };
    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };
    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };
    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}
/* }}} */

fn main() {
    input! {
        a: i32,
        b: i32
    }
    println!("{}", std::cmp::max(std::cmp::max(a+b,a-b),a*b));
}
/* vim:set foldmethod=marker: */


use std::cmp;

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
    	n:usize,
        m:usize
    }

    println!("{}", cmp::max(cmp::max(n+m, n-m), n*m));
}


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
    	n:usize,
        m:usize
    }

    println!("{}", max(max(n+m, n-m), n*m));
}


use proconio::input;

fn main() {
    input!{
        n:i32,
        m:i32,
    }
    println!("{}", vec![n+m, n*m, n-m].iter().fold(n+m, |ans, x| std::cmp::max(ans, *x)));
}


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

let ab=readInts()
let a=ab[0]
let b=ab[1]

let nums=[a+b,a-b,a*b]
print(nums.max()!)


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func main() {
    let ab = readInts()
    let a = ab[0]
    let b = ab[1]

    print([a + b, a - b, a * b].sorted(by: >)[0])
}

main()


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
let ab=readInts()
let a=ab[0]
let b=ab[1]
print(max(a+b,a-b,a*b))


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
let ab=readInts()
let a=ab[0]
let b=ab[1]
print(max(a+b,a-b.a*b))


'use strict'
function main(input: string) {
    const [a, b] = input.split(' ').map(Number);
    console.log(Math.max(a+b, a-b, a*b));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


const input=require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);const nin=()=>{const r = input[0];input.shift();return Number(r)};const nrin=(n)=>{const a:number[]=[];rep(n,()=>a.push(nin()));return a};const sin=()=>{const r = input[0];input.shift();return String(r)};const out=(...a)=>{console.log(...a)};const floor=(a)=>{return Math.floor(a)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const rep=(n, callback)=>{for(let i = 0;i < n; i++){callback()}};const strrep=(s, i, v)=>{return s.slice(0, i)+v+s.slice(i+1);};const permutation=({result=[],pre=[],post,n=post.length})=>{if(n>0){post.forEach((_,i)=>{const rest=[...post];const elem=rest.splice(i, 1);permutation({result, pre: [...pre,...elem],post:rest,n:n-1})})}else{result.push(pre)}return result};const sw=(s,a:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<a.length;i+=2){if(op==='=='){if(s==a[i])return a[i+1]}else if(op==='>='){if(s>=a[i])return a[i+1]}else if(op==='<='){if(s<=a[i])return a[i+1]}else if(op==='>'){if(s>a[i])return a[i+1]}else if(op==='<'){if(s<a[i])return a[i+1]}}return a[a.length-1];};const or=(a,...b)=>{for(let i=0;i<b.length;i++)if(a==b[i])return true;return false};const maxindex=(...a)=>{return a.indexOf(Math.max.apply(null,a))};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const ceil=a=>{return Math.ceil(a)};const srin=s=>{const a:string[]=[];rep(s,()=>a.push(sin()));return a};let ssinteger=-1;const ssin=()=>{ssinteger++;return input[0][ssinteger]};
const main = ()=>{
  let [a,b]=nrin(2)
  out(max(a+b,a-b,a*b)+0)
}
main()


import * as fs from 'fs'

const stdin = fs.readFileSync('/dev/stdin', 'utf8').trim();
const input = stdin
	.split('\n')[0]
	.split(' ')
	.map(Number);

const a = input[0];
const b = input[1];

function solve(a: number, b: number): number {
	const plus = a + b;
	const minus = a - b;
	const multiply = a * b;
	const max = Math.max(plus, minus, multiply);
	return max;
}

export default solve;

console.log(solve(a, b));


import * as fs from 'fs';

//in
//
//out
//
const main = (inp: string) => {
    const [a, b]: number = inp.split('\n').map(Number);
    // a+b
    // a-b
    // a*b
    const ans1: number = a + b;
    const ans2: number = a - b;
    const ans3: number = a * b;

    console.log(Math.max(ans1,ans2,ans3));

    // if (ans1 >= ans2 && ans1 >= ans3) {
    //     console.log(ans1);
    // }
    // if (ans2 >= ans1 && ans2 >= ans3) {
    //     console.log(ans2);
    // }
    // if (ans3 >= ans1 && ans3 >= ans2) {
    //     console.log(ans3);
    // }

};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());


import * as fs from 'fs';

//in
//
//out
//
const main = (inp: string) => {
    const [a, b]: number = inp.split('\n').map(Number);
    // a+b
    // a-b
    // a*b
    const ans1: number = a + b;
    const ans2: number = a - b;
    const ans3: number = a * b;

    if (ans1 >= ans2 && ans1 >= ans3) {
        console.log(ans1);
    }
    if (ans2 >= ans1 && ans2 >= ans3) {
        console.log(ans2);
    }
    if (ans3 >= ans1 && ans3 >= ans2) {
        console.log(ans3);
    }

};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());


import * as readline from "readline";

const rl = readline.createInterface({
    input: process.stdin,
});

const lines = [];
rl.on("line", (line) => {
    lines.push(line);
});
rl.on("close", () => {
    main(lines);
});

function main(lines) {
    const [k, x] = lines[0].split(' ').map(n => parseInt(n));
    const nums = new Array(2 * k - 1).fill(0).map((_, i) => x - (k - 1) + i);
    console.log(nums.join(' '));
}


s=int(input())
L=[1,1,1]
if s<3:
  print(0)
elif s<6:
  print(1)
elif 6<=s:
  for i in range(s-5):
    L.append((L[-1]+L[-3])%(10**9+7))
  print(L[-1])


S = int(input())
DP = [0]*(S+1)
Mod = 10**9+7
if S>=3:
    DP[0] = 1
    DP[1] = 0
    DP[2] = 0
    for TS in range(3,S+1):
        DP[TS] = (DP[TS-1]+DP[TS-3])%Mod
    print(DP[S])
else:
    print(0)


def main():
    MOD = 10 ** 9 + 7

    S = int(input())
    dp = [0] * (S + 1)
    dp[0] = 1

    acc = 0
    for x in range(3, S + 1):
        dp[x] = (acc := (acc + dp[x - 3]) % MOD)

    print(dp[S])

if __name__ == '__main__':
    main()


S = int(input())

if S < 3:
    print(0)
    exit()

ans = [0 for _ in range(S+1)]

ans[3] = 1
ans[4] = 1
ans[5] = 1

for i in range(6, S+1):
    ans[i] = ans[i-3] + ans[i-1]

print(ans[S] % 1000000007)


S=int(input())
ans=[0]*(S+1)
MOD=10**9+7

if S<=2:
    print(0)
    exit(0)

ans[3]=1
for i in range(4,S+1):
    ans[i]=ans[i-1]+ans[i-3]

print(ans[i]%MOD)