#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n / 2; i++) {
    for (int j = 1; j <= m; j++) {
      printf("%d %d\n", i, j);
      printf("%d %d\n", n - i + 1, m - j + 1);
    }
  }
  if (n % 2 == 1) {
    for (int j = 1; j <= m / 2; j++) {
      printf("%d %d\n", (n + 1) / 2, j);
      printf("%d %d\n", (n + 1) / 2, m - j + 1);
    }
    if (m % 2 == 1) {
      printf("%d %d\n", (n + 1) / 2, (m + 1) / 2);
    }
  }
}
