#include <stdio.h>
#include <stdlib.h>

// Define a structure to represent a point
typedef struct {
    int x;
    int y;
} Point;

// Function to print the x coordinate of the first element and the y coordinate of the third element
void foo(Point* points, int N) {
    if (N >= 3) {
        printf("%d %d\n", points[0].x, points[2].y);
    } else {
        printf("Not enough points to access the third element.\n");
    }
}

int main() {
    int N;
    printf("Enter the number of points: ");
    scanf("%d", &N);

    // Check if N is within the given constraints
    if (N < 1 || N > 100) {
        printf("N is out of range. It should be between 1 and 100.\n");
        return 1;
    }

    // Dynamically allocate memory for N points
    Point* points = (Point*) malloc(N * sizeof(Point));
    if (!points) {
        printf("Memory allocation failed.\n");
        return 1;
    }

    // Read x and y coordinates for each point
    for (int i = 0; i < N; i++) {
        scanf("%d %d", &points[i].x, &points[i].y);
    }

    // Call the foo function
    foo(points, N);

    // Free the allocated memory
    free(points);

    return 0;
}