#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, m;
  scanf("%lld%lld", &n, &m);
  for (long long i = 1; i <= n / 2; i++) {
    for (long long j = 1; j <= m; j++) {
      printf("%lld %lld\n", i, j);
      printf("%lld %lld\n", n - i + 1, m - j + 1);
    }
  }
  if (n % 2) {
    for (long long j = 1; j <= m / 2; j++) {
      printf("%lld %lld\n", (n + 1) / 2, j);
      printf("%lld %lld\n", (n + 1) / 2, m - j + 1);
    }
    if (m % 2) {
      printf("%lld %lld\n", (n + 1) / 2, (m + 1) / 2);
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  t = 1;
  for (long long T = 1; T <= t; T++) {
    solve();
  }
}
