#include <iostream>
using namespace std;
void swapPtr(int* a, int* b) {
int c = *a;
*a = *b;
*b = c;
}
void swapRef(int& a, int& b) {
int c = a;
a = b;
b = c;
}
int main() {
int x, y;
cin >> x >> y;
int a = x, b = y;
swapPtr(&a, &b);
cout << "After swapPtr: a=" << a << " b=" << b << "\n";
int c = x, d = y;
swapRef(c, d);
cout << "After swapRef: a=" << c << " b=" << d;
return 0;
}