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