#initializing list
list1 = []
# accepting values from user
n = int(input("Enter number of elements in list: "))
# iterating till the range
for i in range(0, n):
ele = int(input())
list1.append(ele)
# sum and product at even and odd indexes
even_sum = 0
odd_sum = 0
even_prod = 1
odd_prod = 1
# iterating each element in list
for j in range(len(list1)):
if j % 2 == 0:
even_sum += list1[j]
even_prod *= list1[j]
else:
odd_sum += list1[j]
odd_prod *= list1[j]
# Displaying sum and product of even and odd indices
print("Sum of elements at even indices:", even_sum)
print("Product of elements at even indices:", even_prod)
print("Sum of elements at odd indices:", odd_sum)
print("Product of elements at odd indices:", odd_prod)