#include <stdio.h>
int main(void)
{
    int x, replacement, i;
    int values[3] = {5, 10, 15};
    int *p;
    if (scanf("%d%d", &x, &replacement) != 2 || x < -100 || x > 100 || replacement < -100 || replacement > 100) {
        puts("Enter the original and replacement values from -100 to 100.");
        return 1;
    }
    p = &x;
    printf("Pointer targets x: %s\n", p == &x ? "YES" : "NO");
    printf("Before: x = %d, *p = %d\n", x, *p);
    *p = replacement;
    printf("After: x = %d, *p = %d\n", x, *p);
    p = values;
    printf("Array through pointer:");
    for (i = 0; i < 3; i++) printf(" %d", *(p + i));
    putchar('\n');
    return 0;
}
