import sys def is_prime(n): if n < 2: return False for i in range(2, int(n**0.5) + 1): if n % i == 0: return False return True def get_max_score(A, M): r_candidates = [0, 1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30] max_s = -float('inf') for r in r_candidates: if r > A: continue x = A - r if x < 1: continue remainder = r if remainder == 0: s = x - M else: s = x if s > max_s: max_s = s return max_s def main(): input = sys.stdin.read().split() idx = 0 N = int(input[idx]); idx +=1 M = int(input[idx]); idx +=1 A_list = list(map(int, input[idx:idx+N])) # Initialize DP variables. Since we process from right to left, # we only need to keep track of the next state. dp_prev_a = 0 # dp[i+1][0] dp_prev_b = 0 # dp[i+1][1] for i in reversed(range(N)): A = A_list[i] s_max = get_max_score(A, M) # Update current dp values current_a = s_max + dp_prev_b current_b = -s_max + dp_prev_a dp_prev_a, dp_prev_b = current_a, current_b total_diff = dp_prev_a # dp[0][0] is the first player's score diff after processing all piles if total_diff > 0: print("First") else: print("Second") if __name__ == "__main__": main()